Samuel Barnholdt
Samuel Barnholdtโ€ข14mo ago

Compressing parts of query/mutation input

Hi, I'm using trpc with the proxyclient for typesafety but recently hit an obstacle where some strings are so large (I believe that is the error at the very least) that I can't send the payload without getting Unexpected end of JSON input. Has anyone seen this before and if yes, how did you solve it? I am solving it now by compressing parts of the query on the way in and out but not a fan since it's sort of a hidden implementation detail. Can I centralize this somewhere? https://discord.com/channels/867764511159091230/1172197806233092096 <- is something like this the approach to go?
3 Replies
Alex / KATT ๐Ÿฑ
Alex / KATT ๐Ÿฑโ€ข14mo ago
HTTP Batch Link | tRPC
httpBatchLink is a terminating link that batches an array of individual tRPC operations into a single HTTP request that's sent to a single tRPC procedure.
Alex / KATT ๐Ÿฑ
Alex / KATT ๐Ÿฑโ€ข14mo ago
Or you can build or back this issue financially https://github.com/trpc/trpc/issues/3910
GitHub
feat: add HTTP method override option ยท Issue #3910 ยท trpc/trpc
Describe the feature you'd like to request Make it possible to handle biiiiig input payloads on queries by allowing queries to be sent through HTTP POST. Describe the solution you'd like to...
Samuel Barnholdt
Samuel BarnholdtOPโ€ข14mo ago
pledged 100$ if someone's reading this ๐Ÿ™‚

Did you find this page helpful?