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

Function isStale

packages/query-core/src/queryObserver.ts:781–789  ·  view source on GitHub ↗
(
  query: Query<any, any, any, any>,
  options: QueryObserverOptions<any, any, any, any, any>,
)

Source from the content-addressed store, hash-verified

779}
780
781function isStale(
782 query: Query<any, any, any, any>,
783 options: QueryObserverOptions<any, any, any, any, any>,
784): boolean {
785 return (
786 resolveQueryValue(options.enabled, query) !== false &&
787 query.isStaleByTime(resolveQueryValue(options.staleTime, query))
788 )
789}

Callers 4

QueryRowFunction · 0.85
createResultMethod · 0.85
shouldFetchOnFunction · 0.85
shouldFetchOptionallyFunction · 0.85

Calls 2

resolveQueryValueFunction · 0.90
isStaleByTimeMethod · 0.80

Tested by

no test coverage detected