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

Method isDisabled

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

Source from the content-addressed store, hash-verified

279 }
280
281 isDisabled(): boolean {
282 if (this.getObserversCount() > 0) {
283 return !this.isActive()
284 }
285 // if a query has no observers, it should still be considered disabled if it never attempted a fetch
286 return this.options.queryFn === skipToken || !this.isFetched()
287 }
288
289 isFetched() {
290 return this.state.dataUpdateCount + this.state.errorUpdateCount > 0

Callers 3

ContentViewFunction · 0.80
QueryRowFunction · 0.80
refetchQueriesMethod · 0.80

Calls 3

getObserversCountMethod · 0.95
isActiveMethod · 0.95
isFetchedMethod · 0.95

Tested by

no test coverage detected