MCPcopy
hub / github.com/TanStack/query / isStatic

Method isStatic

packages/query-core/src/query.ts:286–295  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

284 }
285
286 isStatic(): boolean {
287 if (this.getObserversCount() > 0) {
288 return this.observers.some(
289 (observer) =>
290 resolveStaleTime(observer.options.staleTime, this) === 'static',
291 )
292 }
293
294 return false
295 }
296
297 isStale(): boolean {
298 // check observers first, their `isStale` has the source of truth

Callers 2

QueryRowFunction · 0.80
refetchQueriesMethod · 0.80

Calls 2

getObserversCountMethod · 0.95
resolveStaleTimeFunction · 0.90

Tested by

no test coverage detected