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

Method isFetching

packages/query-core/src/queryClient.ts:150–155  ·  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. * * @example * ```ts * if (queryClient.isFetching()) { * console.l

(
    filters?: TQueryFilters,
  )

Source from the content-addressed store, hash-verified

148 * ```
149 */
150 isFetching<TQueryFilters extends QueryFilters<any> = QueryFilters>(
151 filters?: TQueryFilters,
152 ): number {
153 return this.#queryCache.findAll({ ...filters, fetchStatus: 'fetching' })
154 .length
155 }
156
157 /**
158 * 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