Input is too big for a single dispatch
I decided to try tRPC for my Crypto analytics dashboard. However, I'm having a hard time passing the time series data between the client & the server.
First I received an HTTP error
Request header too large
I was able to fix this by setting maxURLLength
However, now I receive another error "Input is too big for a single dispatch"
So my question does tRPC even support such queries, where you send long arrays of data as inputs?6 Replies
Is this is a query? Might be worth trying a mutation instead, tRPC currently uses GET for queries and that has limitations
Yes. It's a query. I've ended up with switching to mutation 😄
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yeah this is a limitation right now AFAIK, there is chatter about making queries more flexible, like using a POST under the hood, just not sure where the core team are with that. In general though, sending a large amount of data by a query is probably a code-smell. I am aware there are some legit use cases though
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
It's pretty easy to just wrap a mutation call in a react query useQuery hook, probably the simplest workaround I think: