TanStack
API Reference

QueryObserverLoadingErrorResult

Defined in: packages/query-core/src/types.ts:982

Extends

Type Parameters

TData

TData = unknown

TError

TError = DefaultError

Properties

PropertyTypeDescriptionOverrides
dataundefinedThe last successfully resolved data for the query.QueryObserverBaseResult.data
dataUpdatedAtnumberThe timestamp for when the query most recently returned the status as "success".-
errorTErrorThe error object for the query, if an error was thrown. - Defaults to null.QueryObserverBaseResult.error
errorUpdateCountnumberThe sum of all errors.-
errorUpdatedAtnumberThe timestamp for when the query most recently returned the status as "error".-
failureCountnumberThe failure count for the query. - Incremented every time the query fails. - Reset to 0 when the query succeeds.-
failureReasonTError | nullThe failure reason for the query retry. - Reset to null when the query succeeds.-
fetchStatus"fetching" | "paused" | "idle"The fetch status of the query. - fetching: Is true whenever the queryFn is executing, which includes initial pending as well as background refetch. - paused: The query wanted to fetch, but has been paused. - idle: The query is not fetching. - See Network Mode for more information.-
isEnabledbooleantrue if this observer is enabled, false otherwise.-
isErrortrueA derived boolean from the status variable, provided for convenience. - true if the query attempt resulted in an error.QueryObserverBaseResult