Suggested way to invalidate queries on a component that is used on multiple pages.
Please suggest me a way I can handle the following situation in the best possinle manner.
Coinsider a Component
- used in multiple pages
- has mutations, which requires query invalidation on other components of the page.
- the query invalidation differes from page to page, if we invalidate everything that will be waste of network request. - I dont always have the key to invalidate the cache
- the query invalidation differes from page to page, if we invalidate everything that will be waste of network request. - I dont always have the key to invalidate the cache
.invalidate({ id: input.id }) // input.id is not known
solutions tried
- conditionally do invalidtion based on route4.8KMembers
View on DiscordMore Posts
Setting up trpc behind AWS API gateway and authorizing using a lambdaCurrent setup:
- trpc api, containing both public an private procedures. Let's call them `posts.listsetMutationDefaults for optimistic updatesI have a `preferences` router, with a `get` query and a `set` mutation. I had optimistic updates set