SebasPtsch
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