MCPcopy Create free account
hub / github.com/TanStack/query / isFetching

Method isFetching

packages/query-core/src/queryClient.ts:154–157  ·  view source on GitHub ↗

* Returns the number of queries in the cache that are currently fetching, optionally * matching a set of filters. This includes background-fetching, loading new pages, and * loading more infinite query results. * @param filters - Narrows down which fetching queries are counted. Without filt

(filters?: Omit<QueryFilters, 'fetchStatus'>)

Source from the content-addressed store, hash-verified

152 * ```
153 */
154 isFetching(filters?: Omit<QueryFilters, 'fetchStatus'>): number {
155 return this.#queryCache.findAll({ ...filters, fetchStatus: 'fetching' })
156 .length
157 }
158
159 /**
160 * Returns the number of mutations in the cache that are currently pending, optionally

Callers 12

WithKnownParametersFunction · 0.45
WithIdentifiersFunction · 0.45
WithKnownParametersFunction · 0.45
WithIdentifiersFunction · 0.45
ExamplesFunction · 0.45
ExamplesFunction · 0.45
ExamplesFunction · 0.45
ExamplesFunction · 0.45
ExamplesFunction · 0.45
ExamplesFunction · 0.45

Calls 1

findAllMethod · 0.45

Tested by

no test coverage detected