http-link-dataloader icon indicating copy to clipboard operation
http-link-dataloader copied to clipboard

Error: Value for field responseText is too long

Open Fi1osof opened this issue 6 years ago • 2 comments

Trying set record value string ~1.5 Mbytes. Schema field type String.

type Queue {
  id: ID! @unique
  responseText: String
  ...
}

Database column type mediumtext | utf8mb4_unicode_ci (tryed set to longtext too).

Got error.

Error: Value for field responseText is too long.
    at BatchedGraphQLClient.<anonymous> (/...../server/node_modules/http-link-dataloader/src/BatchedGraphQLClient.ts:68:15)
    at step (/...../server/node_modules/http-link-dataloader/dist/src/BatchedGraphQLClient.js:40:23)
    at Object.next (/...../server/node_modules/http-link-dataloader/dist/src/BatchedGraphQLClient.js:21:53)
    at fulfilled (/...../server/node_modules/http-link-dataloader/dist/src/BatchedGraphQLClient.js:12:58)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:182:7)

UPD: response length 1196808

Fi1osof avatar Jun 13 '18 04:06 Fi1osof

Same here, is anyone working on this?

andreylh avatar Jul 31 '18 14:07 andreylh

For anyone else who lands here... I initially had the field I got this error on defined as an ID! @unique, which I'd added to an existing data type with a dedicated id field already. After getting the error, I figured maybe it had to do with using ID, so I changed it to a String... still got the error. But then I completely deleted and re-deployed my Prisma service, (creating everything from scratch) and it started working fine.

Obviously deleting and redeploying isn't a viable solution in many cases (I'm lucky that the DB I was working on was still new) but maybe that'll help someone triage this or at least provide a work-around.

Oh, and I'm fairly certain the issue isn't with this library itself, but with the underlying Prisma code that's running on the Prisma server... this lib just shows up in the stacktrace because it's the one making the request to the server.

kgoggin avatar Apr 08 '19 19:04 kgoggin