Replies: 1 comment 2 replies
-
There is nowhere we could get the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have queries that build on top of other queries, and it's currently difficult to keep passing around a reference to queryClient.
To take an example from this page (https://tanstack.com/query/latest/docs/framework/react/guides/query-options), I'd like it if I could do something like this:
Achieving the same today, requires a function signature like
groupOptions(queryClient: QueryClient, id: number)
, and passingqueryClient
through the whole function stack just to trigger invalidation within a context that ostensibly is already working with the desired queryClient instance.A similar request was addressed here, for adding it to queryContext, but this is a higher-level request that doesn't need to affect queries/observers/etc. It should be entirely static. #3151
I imagine it could be implemented something like:
Beta Was this translation helpful? Give feedback.
All reactions