T
TanStack3y ago
rival-black

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
metropolitan-bronze3y ago
QueryCache | 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
puzzled-coral3y 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.

Did you find this page helpful?