Files
upstream-tanstack-query/docs/framework/vue/reference/interfaces/QueryObserverLoadingErrorResult.md
upstream-mirror 3a013ccdfe
Some checks failed
autofix.ci / autofix (push) Failing after 4s
Release / Release (push) Has been skipped
GitHub Actions Security Analysis / Run zizmor (push) Failing after 2s
snapshot of https://github.com/TanStack/query.git (main, 2026-09-16; blobs > 131072B omitted)
2026-09-16 01:13:08 +05:00

11 KiB

id, title
id title
QueryObserverLoadingErrorResult QueryObserverLoadingErrorResult

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

Extends

Type Parameters

TData

TData = unknown

TError

TError = DefaultError

Properties

data

data: undefined;

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

The last successfully resolved data for the query.

Overrides

QueryObserverBaseResult.data


dataUpdatedAt

dataUpdatedAt: number;

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

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

Inherited from

QueryObserverBaseResult.dataUpdatedAt


error

error: TError;

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

The error object for the query, if an error was thrown.

  • Defaults to null.

Overrides

QueryObserverBaseResult.error


errorUpdateCount

errorUpdateCount: number;

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

The sum of all errors.

Inherited from

QueryObserverBaseResult.errorUpdateCount


errorUpdatedAt

errorUpdatedAt: number;

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

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

Inherited from

QueryObserverBaseResult.errorUpdatedAt


failureCount

failureCount: number;

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

The failure count for the query.

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

Inherited from

QueryObserverBaseResult.failureCount


failureReason

failureReason: TError | null;

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

The failure reason for the query retry.

  • Reset to null when the query succeeds.

Inherited from

QueryObserverBaseResult.failureReason


fetchStatus

fetchStatus: FetchStatus;

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

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.

Inherited from

QueryObserverBaseResult.fetchStatus


isEnabled

isEnabled: boolean;

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

true if this observer is enabled, false otherwise.

Inherited from

QueryObserverBaseResult.isEnabled


isError

isError: true;

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

A derived boolean from the status variable, provided for convenience.

  • true if the query attempt resulted in an error.

Overrides

QueryObserverBaseResult.isError


isFetched

isFetched: boolean;

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

Will be true if the query has been fetched.

Inherited from

QueryObserverBaseResult.isFetched


isFetchedAfterMount

isFetchedAfterMount: boolean;

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

Will be true if the query has been fetched after the component mounted.

  • This property can be used to not show any previously cached data.

Inherited from

QueryObserverBaseResult.isFetchedAfterMount


isFetching

isFetching: boolean;

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

A derived boolean from the fetchStatus variable, provided for convenience.

  • true whenever the queryFn is executing, which includes initial pending as well as background refetch.

Inherited from

QueryObserverBaseResult.isFetching


isInitialLoading

isInitialLoading: boolean;

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

Deprecated

isInitialLoading is being deprecated in favor of isLoading and will be removed in the next major version.

Inherited from

QueryObserverBaseResult.isInitialLoading


isLoading

isLoading: false;

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

Is true whenever the first fetch for a query is in-flight.

  • Is the same as isFetching && isPending.

Overrides

QueryObserverBaseResult.isLoading


isLoadingError

isLoadingError: true;

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

Will be true if the query failed while fetching for the first time.

Overrides

QueryObserverBaseResult.isLoadingError


isPaused

isPaused: boolean;

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

A derived boolean from the fetchStatus variable, provided for convenience.

  • The query wanted to fetch, but has been paused.

Inherited from

QueryObserverBaseResult.isPaused


isPending

isPending: false;

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

Will be pending if there's no cached data and no query attempt was finished yet.

Overrides

QueryObserverBaseResult.isPending


isPlaceholderData

isPlaceholderData: false;

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

Will be true if the data shown is the placeholder data.

Overrides

QueryObserverBaseResult.isPlaceholderData


isRefetchError

isRefetchError: false;

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

Will be true if the query failed while refetching.

Overrides

QueryObserverBaseResult.isRefetchError


isRefetching

isRefetching: boolean;

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

Is true whenever a background refetch is in-flight, which does not include initial pending.

  • Is the same as isFetching && !isPending.

Inherited from

QueryObserverBaseResult.isRefetching


isStale

isStale: boolean;

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

Will be true if the data in the cache is invalidated or if the data is older than the given staleTime.

Inherited from

QueryObserverBaseResult.isStale


isSuccess

isSuccess: false;

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

A derived boolean from the status variable, provided for convenience.

  • true if the query has received a response with no errors and is ready to display its data.

Overrides

QueryObserverBaseResult.isSuccess


refetch()

refetch: (options?) => Promise<QueryObserverResult<TData, TError>>;

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

A function to manually refetch the query.

Parameters

options?

RefetchOptions

Returns

Promise<QueryObserverResult<TData, TError>>

Inherited from

QueryObserverBaseResult.refetch


status

status: "error";

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

The status of the query.

  • Will be:
    • pending if there's no cached data and no query attempt was finished yet.
    • error if the query attempt resulted in an error.
    • success if the query has received a response with no errors and is ready to display its data.

Overrides

QueryObserverBaseResult.status