0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-16 22:50:20 +00:00
query/docs/framework/angular/reference/interfaces/QueryState.md
Wonsuk Choi e57f8163b1
docs(query-core): add JSDoc across the package and expose it in generated reference docs (#11438)
* docs(query-core): add JSDoc across the package and expose it in generated reference docs

* docs(config.json): add sidebar entries for newly generated query-core reference docs

* docs(query-core): migrate remaining prose from the legacy 'docs/reference' pages into JSDoc

* docs(query-core): remove legacy 'docs/reference' pages superseded by the generated reference

* docs(query-core): regenerate reference docs after merging main

* docs(query-core): document missing default values for MutationOptions, combine, and QueryFilters.type

* fix(query-devtools): drop unnecessary 'query-core' project reference

* docs(query-core): document missing default values and normalize 'Defaults to' spacing

* docs(query-core): fix 'environmentManager' JSDoc example
2026-09-07 18:22:38 +02:00

4 KiB

id title
QueryState QueryState

Defined in: packages/query-core/src/query.ts:52

The raw state stored on a Query instance. This is the underlying state that observer results (e.g. QueryObserverResult) are derived from.

Type Parameters

TData

TData = unknown

TError

TError = DefaultError

Properties

data

data: TData | undefined;

Defined in: packages/query-core/src/query.ts:56

The last successfully resolved data for the query.


dataUpdateCount

dataUpdateCount: number;

Defined in: packages/query-core/src/query.ts:60

The number of times the query has successfully resolved.


dataUpdatedAt

dataUpdatedAt: number;

Defined in: packages/query-core/src/query.ts:64

The timestamp for when the query most recently returned the status as "success".


error

error: TError | null;

Defined in: packages/query-core/src/query.ts:69

The error object for the query, if the last attempt resulted in an error.

  • Defaults to null.

errorUpdateCount

errorUpdateCount: number;

Defined in: packages/query-core/src/query.ts:73

The sum of all errors, incremented every time the query resolves with an error.


errorUpdatedAt

errorUpdatedAt: number;

Defined in: packages/query-core/src/query.ts:77

The timestamp for when the query most recently returned the status as "error".


fetchFailureCount

fetchFailureCount: number;

Defined in: packages/query-core/src/query.ts:83

The failure count for the current fetch.

  • Incremented every time the fetch fails.
  • Reset to 0 when the fetch succeeds.

fetchFailureReason

fetchFailureReason: TError | null;

Defined in: packages/query-core/src/query.ts:88

The reason the current fetch failed, as reported by the retryer.

  • Reset to null when the fetch succeeds.

fetchMeta

fetchMeta: FetchMeta | null;

Defined in: packages/query-core/src/query.ts:93

Metadata passed to the currently in-flight (or most recent) fetch, e.g. the fetchMore direction for infinite queries.


fetchStatus

fetchStatus: FetchStatus;

Defined in: packages/query-core/src/query.ts:112

The fetch status of the query.

  • fetching: the queryFn is currently executing.
  • paused: a fetch wanted to run but has been paused (see network mode).
  • idle: the query is not fetching.

isInvalidated

isInvalidated: boolean;

Defined in: packages/query-core/src/query.ts:98

Whether the query has been marked as invalidated via invalidate().

  • Reset to false whenever the query resolves successfully.

status

status: QueryStatus;

Defined in: packages/query-core/src/query.ts:105

The status of the query.

  • pending if there's no cached data and no attempt was finished yet.
  • error if the last attempt resulted in an error.
  • success if the query has data.