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

Method isStatic

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

Source from the content-addressed store, hash-verified

291 }
292
293 isStatic(): boolean {
294 if (this.getObserversCount() > 0) {
295 return this.observers.some(
296 (observer) =>
297 resolveStaleTime(observer.options.staleTime, this) === 'static',
298 )
299 }
300
301 return false
302 }
303
304 isStale(): boolean {
305 // 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