How to infer query types on client?
NextJS Output Typings
.useQuery()
it says the result is unknown
. (Images Attached)
Another problem I face is related to a potential solution I found to this problem, by casting a type to the response it fixes the empty object type. But now the types complex values get converted to string, which I see why this would happen because data is transmitted through JSON. Is there a Generic or some type I'm missing so I can correctly type function parameters?...
'react-server-dom-webpack/client' error
React Query client errors on 401
TRPCError({ code: "UNAUTHORIZED" })
in a middleware, and handling error states returned from useQuery
. However, each time I return a 401 with the TRPCError
I get the following client error from the tRPC client. Why does it do this? It messes up my React as well (see the second error). I thought you were supposed to throw TRPCError
s? (Note: also using Tanstack Router, and running on Vinxi so it's all kinda experimental, do tell if that's what could be causing it.)
Extremely slow queries

TRPC works but getting unpredictable Typescript warnings for a barebones trpc monorepo project

Kirimase's tRPC usage CRUD route

Client `tsc` checking server code
tsc
to build the Vite app starts trying to apply the client's typescript rules to the server's code. Is this a known issue, and is there a decent solution to this? If not, I can provide a simple repo which reproduces the issue.Unable to set up a client side subscription to a trpc route that supports websockets

what's this union type doing(Zod)?
trpc's useQuery with undefined input adds extra {"values":["undefined"]} to query
Can you ensureData without the useUtils hook?
ensureQueryData
in a route’s loader function if using Tanstack Query:
https://tanstack.com/router/v1/docs/guide/external-data-loading#a-more-realistic-example-using-tanstack-query
As far as I can tell, ensureQueryData
is only available through the trpc useUtils
hook in a component. Can I get it, or the full query options, some other way?...Help with queries vs mutations
Interceptor in server
Can't do server side data fetching with RSC.
error: TRPCClientError: Unexpected token < in JSON at position 0
Likely trpc is returning HTML though I don't know why. Now if instead of fetching with a RSC, I trigger the data fetching via a "server action" I get the following error
```
TRPCClientError: fetch failed
at TRPCClientError.from (webpack-internal:///(rsc)/../../nodemodules/.pnpm/@trpc+client@10.45.0@trpc+server@10.45.0/node_modules/@trpc/client/dist/TRPCClientError-38f9a32a.mjs:43:16)...v10, passing useQuery options, queryKey mandatory?
tRPC, NextJS 14, createTRPCProxyClient, How can I globally manage errors?
next 14 setup error
No typesafety after migrating to 11?
t
is any...
is there a way to send a streaming response