--- id: QueryObserverBaseResult title: QueryObserverBaseResult --- Defined in: [packages/query-core/src/types.ts:934](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L934) The properties shared by every state of a query result, like `data`, `error`, `status`, the `is*` flags, and `refetch`. Each `QueryObserver*Result` narrows them for one state. ## Extended by - [`QueryObserverPendingResult`](QueryObserverPendingResult.md) - [`QueryObserverLoadingResult`](QueryObserverLoadingResult.md) - [`QueryObserverLoadingErrorResult`](QueryObserverLoadingErrorResult.md) - [`QueryObserverRefetchErrorResult`](QueryObserverRefetchErrorResult.md) - [`QueryObserverSuccessResult`](QueryObserverSuccessResult.md) - [`QueryObserverPlaceholderResult`](QueryObserverPlaceholderResult.md) - [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md) ## Type Parameters ### TData `TData` = `unknown` ### TError `TError` = [`DefaultError`](../type-aliases/DefaultError.md) ## Properties | Property | Type | Description | | ------ | ------ | ------ | | `data` | `TData` \| `undefined` | The last successfully resolved data for the query. | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | | `error` | `TError` \| `null` | The error object for the query, if an error was thrown. - Defaults to `null`. | | `errorUpdateCount` | `number` | The sum of all errors. | | `errorUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"error"`. | | `failureCount` | `number` | The failure count for the query. - Incremented every time the query fails. - Reset to `0` when the query succeeds. | | `failureReason` | `TError` \| `null` | The 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](https://tanstack.com/query/latest/docs/framework/react/guides/network-mode) for more information. | | `isEnabled` | `boolean` | `true` if this observer is enabled, `false` otherwise. | | `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query attempt resulted in an error. | | `isFetched` | `boolean` | Will be `true` if the query has been fetched. | | `isFetchedAfterMount` | `boolean` | 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. | | `isFetching` | `boolean` | 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. | | ~~`isInitialLoading`~~ | `boolean` | **Deprecated** `isInitialLoading` is being deprecated in favor of `isLoading` and will be removed in the next major version. | | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | | `isLoadingError` | `boolean` | Will be `true` if the query failed while fetching for the first time. | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | | `isPending` | `boolean` | Will be `pending` if there's no cached data and no query attempt was finished yet. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | | `isStale` | `boolean` | Will be `true` if the data in the cache is invalidated or if the data is older than the given `staleTime`. | | `isSuccess` | `boolean` | 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. | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | | `status` | `"error"` \| `"pending"` \| `"success"` | 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. |