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

Method isStatic

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

Source from the content-addressed store, hash-verified

289 }
290
291 isStatic(): boolean {
292 if (this.getObserversCount() > 0) {
293 return this.observers.some(
294 (observer) =>
295 resolveQueryValue(observer.options.staleTime, this) === 'static',
296 )
297 }
298
299 return false
300 }
301
302 isStale(): boolean {
303 // check observers first, their `isStale` has the source of truth

Callers 2

QueryRowFunction · 0.80
refetchQueriesMethod · 0.80

Calls 2

getObserversCountMethod · 0.95
resolveQueryValueFunction · 0.90

Tested by

no test coverage detected