List all "in progress" queries -- is this possbile?
I'm looking for a way to view and list all in-progress queries that the QueryProvider is currently running.
Is there a way to do this?
2 Replies
metropolitan-bronze•3y ago
Would
queryCache.findAll() help? https://tanstack.com/query/v4/docs/react/reference/QueryCache#querycachefindallQueryCache | TanStack Query Docs
The QueryCache is the storage mechanism for TanStack Query. It stores all the data, meta information and state of queries it contains.
Normally, you will not interact with the QueryCache directly and instead use the QueryClient for a specific cache.
puzzled-coral•3y ago
This is something you'd need to handle yourself through application state. There is the
useIsFetching hook (see: https://tanstack.com/query/v4/docs/react/reference/useIsFetching) that returns the number of fetching queries but it doesn't enable you to identify them.