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

Function isStale

packages/query-core/src/queryObserver.ts:894–902  ·  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

892}
893
894function isStale(
895 query: Query<any, any, any, any>,
896 options: QueryObserverOptions<any, any, any, any, any>,
897): boolean {
898 return (
899 resolveQueryValue(options.enabled, query) !== false &&
900 query.isStaleByTime(resolveQueryValue(options.staleTime, query))
901 )
902}

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