Every time we need agnostic access to the cache (mainly for cache invalidation on messages from service worker), we should use getQueryKey instead of assuming we know the shape of the key.
Right now, every version upgrade of tRPC needs to be thoroughly checked because a change in the underlying react-query cache keys and/or request param syntax might not be marked as "breaking" (since most users probably don't rely on them). Having a less leaky abstraction might make the whole thing more robust.
Every time we need agnostic access to the cache (mainly for cache invalidation on messages from service worker), we should use
getQueryKey
instead of assuming we know the shape of the key.Right now, every version upgrade of tRPC needs to be thoroughly checked because a change in the underlying react-query cache keys and/or request param syntax might not be marked as "breaking" (since most users probably don't rely on them). Having a less leaky abstraction might make the whole thing more robust.