Chen
Is it possible to change the base path?
I have my trpc server on an endpoint:
api.examples.com/trpc
- this should be the root, and trpc handles anything subsequent.
But querying this with a client, I get the error:
Is it possible to have the trpc server factor out the /trpc
part of the path?3 replies
Client `tsc` checking server code
I have a trpc server and vite/react client set up in a pnpm monorepo. The VSCode type checking is behaving fine, but running
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.3 replies
Can you ensureData without the useUtils hook?
The Tanstack Router docs recommend calling
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?5 replies