SebasPtsch
tRPC Client Bundling `node_modules`
Hey team, I've been having an issue recently where tRPC seems to be bundling a
.pnpm
and node_modules
in @trpc/client
. This is causing a lot of errors as I'm not using pnpm:
<project>/node_modules/@trpc/client/dist/TRPCClientError.mjs
This issue seems to first appear in rc 630.4 replies
Get Query Key on Server
I'm following some recommended practices from one of the react query maintainers
@tkdodo
and want to invalidate queries from the server in a type-safe way. As a result of this I want to be able to get the query keys for queries on the server to properly invalidate them using a trpc subscription. Is there a clean way to feed the router definition into getQueryKey
?
At the moment what I'm doing is:
This is not in the react context and I don't really want to import react in order to get the query key13 replies