* Returns `true` if the query is disabled, meaning it will not fetch * automatically. * - If the query has observers, it is disabled when none of them are active * (see `isActive`). * - If the query has no observers, it is disabled when its `queryFn` is * `skipToken` or it has nev
()
| 484 | * @returns `true` if the query is disabled. |
| 485 | */ |
| 486 | isDisabled(): boolean { |
| 487 | if (this.getObserversCount() > 0) { |
| 488 | return !this.isActive() |
| 489 | } |
| 490 | // if a query has no observers, it should still be considered disabled if it never attempted a fetch |
| 491 | return this.options.queryFn === skipToken || !this.isFetched() |
| 492 | } |
| 493 | |
| 494 | /** |
| 495 | * Returns `true` if the query has been fetched, i.e. it has resolved with |
no test coverage detected