Chen
Chen
TtRPC
Created by Chen on 9/22/2024 in #❓-help
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:
TRPCError: No procedure found on path "trpc/me.details"
TRPCError: No procedure found on path "trpc/me.details"
Is it possible to have the trpc server factor out the /trpc part of the path?
3 replies
TtRPC
Created by Chen on 1/17/2024 in #❓-help
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
TtRPC
Created by Chen on 1/17/2024 in #❓-help
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