Trouble inferring the type of a very simple structure of nested routers

calling trpc endpoints from vanilla nextJs api routes
Multiple React providers
Mutation type issue
const updateColumn = trpc.project.update.useMutation();
updateColumn.mutate({ colId: list.id, cards: list.cards })
const updateColumn = trpc.project.update.useMutation();
updateColumn.mutate({ colId: list.id, cards: list.cards })

Can I redirect the user from inside my router?
res.redirect("/404")
but can't seem to find a way to do it
Should I just handle it in the front-end with a useEffect?...Which http library trpc uses in the frontend?
trpc
uses the Fetch API
or uses something like Axios
to do API calls from the frontend. I recently added supertokens
to an app and I need to add a middleware for session refreshment depending on the tool I'd be usinguseQueryClient is not working as expected
queryClient
strongly typed. Now I moved to v10 and for some reason, the documentation says that the queryClient was removed from the context so I should use the useQueryClient hook directly from @tanstack
but if I do so then the queryClient returned by that hook is not the queryClient trpc
is using, it's just empty. I made it work by using the trpc.useContext
hook coming from my client utils but I definitely think that the docs a...Infer the type of ctx for a specific procedure
CORS in standalone server

Test example for react-testing-library
trpc.withTRPC
.
The docs doesn't have a section refering to test, just an example of using context inner
, but that also doesn't work in case we actually need to have the req
or the res
in the context (in NextJS context), for example, to set cookies, etc.
Would be welcome to add a section about testing and how to wrap components with react testing library and actually run tests where we actually need the next req, res in the context? (It might not be necessary to have the entire req,res in the context but utility to set cookies in the response to handle auth, for example, etc)...
Queries break when in production on Vercel; work on localhost

Can't get client to work

Request context inside middleware?
data becomes never[] when destructuring with a fallback value
data
property, for example:
```ts
const { data = [] } = trpc.useQuery(['company.listIds']);
// expecting data to be the inferred type { id: string }[] but instead it's never[] ...SyntaxError Unexpected token u in JSON at position 0 with mutations
Losing the type between the client and server
Mobile app with tRPC
How to use trpc react hooks from an external data source
createTRPCProxyClient
createTRPCProxyClient

V10. How to infer types on V10?

NextJS & Keystone CMS, issues when connecting both in a monorepo
