* 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
()
| 398 | * `skipToken` or it has never been fetched. |
| 399 | */ |
| 400 | isDisabled(): boolean { |
| 401 | if (this.getObserversCount() > 0) { |
| 402 | return !this.isActive() |
| 403 | } |
| 404 | // if a query has no observers, it should still be considered disabled if it never attempted a fetch |
| 405 | return this.options.queryFn === skipToken || !this.isFetched() |
| 406 | } |
| 407 | |
| 408 | /** |
| 409 | * Returns `true` if the query has been fetched, i.e. it has resolved with |
no test coverage detected