trpc-sveltekit icon indicating copy to clipboard operation
trpc-sveltekit copied to clipboard

Allow passing link options (specifically, maxURLLength) when calling createTRPCClient

Open brunobely opened this issue 1 year ago • 0 comments

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

brunobely avatar Oct 26 '23 23:10 brunobely