Allow passing link options (specifically, maxURLLength) when calling createTRPCClient
brunobely opened this issue · 0 comments
brunobely commented
Describe the bug
When calling a procedure with particularly large input objects, since there is a max size for URLs and the input is passed via URL params, my call is resulting in the error 431 (Request Header Fields Too Large)
. tRPC has a maxURLLength
property to address that, and I was hoping we could add support for it in trpc-sveltekit.
As a temporary workaround, I'm using code from here to create an httpBatchLink
with the appropriate maxURLLength
field set: https://github.com/icflorescu/trpc-sveltekit/blob/main/package/src/client.ts