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

Method isDisabled

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

Source from the content-addressed store, hash-verified

277 }
278
279 isDisabled(): boolean {
280 if (this.getObserversCount() > 0) {
281 return !this.isActive()
282 }
283 // if a query has no observers, it should still be considered disabled if it never attempted a fetch
284 return this.options.queryFn === skipToken || !this.isFetched()
285 }
286
287 isFetched() {
288 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