From 4f15df1ab83dbbd95109f148f64562061f54f681 Mon Sep 17 00:00:00 2001 From: Wonsuk Choi Date: Sat, 14 Nov 2026 21:35:19 +0900 Subject: [PATCH 1/5] docs(query-core/types): describe 'status', 'isPending', 'isSuccess' and 'isError' of the query result by its current data and error --- .../InfiniteQueryObserverBaseResult.md | 8 +-- ...InfiniteQueryObserverLoadingErrorResult.md | 4 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 4 +- ...InfiniteQueryObserverRefetchErrorResult.md | 4 +- .../InfiniteQueryObserverSuccessResult.md | 4 +- .../interfaces/QueryObserverBaseResult.md | 8 +-- .../QueryObserverLoadingErrorResult.md | 4 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 4 +- .../QueryObserverRefetchErrorResult.md | 4 +- .../interfaces/QueryObserverSuccessResult.md | 4 +- .../InfiniteQueryObserverBaseResult.md | 8 +-- ...InfiniteQueryObserverLoadingErrorResult.md | 4 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 4 +- ...InfiniteQueryObserverRefetchErrorResult.md | 4 +- .../InfiniteQueryObserverSuccessResult.md | 4 +- .../interfaces/QueryObserverBaseResult.md | 8 +-- .../QueryObserverLoadingErrorResult.md | 4 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 4 +- .../QueryObserverRefetchErrorResult.md | 4 +- .../interfaces/QueryObserverSuccessResult.md | 4 +- .../reference/functions/useInfiniteQuery.md | 8 +-- .../preact/reference/functions/useQuery.md | 8 +-- .../InfiniteQueryObserverBaseResult.md | 8 +-- ...InfiniteQueryObserverLoadingErrorResult.md | 4 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 4 +- ...InfiniteQueryObserverRefetchErrorResult.md | 4 +- .../InfiniteQueryObserverSuccessResult.md | 4 +- .../interfaces/QueryObserverBaseResult.md | 8 +-- .../QueryObserverLoadingErrorResult.md | 4 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 4 +- .../QueryObserverRefetchErrorResult.md | 4 +- .../interfaces/QueryObserverSuccessResult.md | 4 +- .../reference/functions/useInfiniteQuery.md | 8 +-- .../react/reference/functions/useQuery.md | 8 +-- .../InfiniteQueryObserverBaseResult.md | 8 +-- ...InfiniteQueryObserverLoadingErrorResult.md | 4 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 4 +- ...InfiniteQueryObserverRefetchErrorResult.md | 4 +- .../InfiniteQueryObserverSuccessResult.md | 4 +- .../interfaces/QueryObserverBaseResult.md | 8 +-- .../QueryObserverLoadingErrorResult.md | 4 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 4 +- .../QueryObserverRefetchErrorResult.md | 4 +- .../interfaces/QueryObserverSuccessResult.md | 4 +- .../reference/functions/useInfiniteQuery.md | 8 +-- .../solid/reference/functions/useQuery.md | 8 +-- .../InfiniteQueryObserverBaseResult.md | 8 +-- ...InfiniteQueryObserverLoadingErrorResult.md | 4 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 4 +- ...InfiniteQueryObserverRefetchErrorResult.md | 4 +- .../InfiniteQueryObserverSuccessResult.md | 4 +- .../interfaces/QueryObserverBaseResult.md | 8 +-- .../QueryObserverLoadingErrorResult.md | 4 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 4 +- .../QueryObserverRefetchErrorResult.md | 4 +- .../interfaces/QueryObserverSuccessResult.md | 4 +- .../functions/createInfiniteQuery.md | 8 +-- .../svelte/reference/functions/createQuery.md | 8 +-- .../InfiniteQueryObserverBaseResult.md | 8 +-- ...InfiniteQueryObserverLoadingErrorResult.md | 4 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 4 +- ...InfiniteQueryObserverRefetchErrorResult.md | 4 +- .../InfiniteQueryObserverSuccessResult.md | 4 +- .../interfaces/QueryObserverBaseResult.md | 8 +-- .../QueryObserverLoadingErrorResult.md | 4 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 4 +- .../QueryObserverRefetchErrorResult.md | 4 +- .../interfaces/QueryObserverSuccessResult.md | 4 +- .../InfiniteQueryObserverBaseResult.md | 8 +-- ...InfiniteQueryObserverLoadingErrorResult.md | 4 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 4 +- ...InfiniteQueryObserverRefetchErrorResult.md | 4 +- .../InfiniteQueryObserverSuccessResult.md | 4 +- .../interfaces/QueryObserverBaseResult.md | 8 +-- .../QueryObserverLoadingErrorResult.md | 4 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 4 +- .../QueryObserverRefetchErrorResult.md | 4 +- .../interfaces/QueryObserverSuccessResult.md | 4 +- packages/query-core/src/types.ts | 68 +++++++++---------- 107 files changed, 290 insertions(+), 290 deletions(-) diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md index 83b064ee427..d535fc27aa2 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -51,7 +51,7 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `hasNextPage` | `boolean` | Will be `true` if there is a next page to be fetched (known via the `getNextPageParam` option). | | `hasPreviousPage` | `boolean` | Will be `true` if there is a previous page to be fetched (known via the `getPreviousPageParam` option). | | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index d5a9fa32d6a..0ce9371d230 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -52,11 +52,11 @@ An infinite query result in the `error` state when the first fetch failed, so th | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingResult.md index 54849053197..08bedcf2cb4 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPendingResult.md index c53ba2ef772..e3b464b8caf 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index fa34dcb4886..95bc9de5148 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,11 +53,11 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 7248dbe5602..969a6313b43 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,11 +53,11 @@ kept. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 23d3b10de06..026f0e7aa43 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,11 +52,11 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md index dcedb5a261b..ab4a91d9b33 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md @@ -43,7 +43,7 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/angular/reference/interfaces/QueryObserverLoadingErrorResult.md index a413c24e4d4..b5570ba9f0f 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -44,11 +44,11 @@ A query result in the `error` state when the first fetch failed, so there is no | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/angular/reference/interfaces/QueryObserverLoadingResult.md index f053574cd3d..a7cb783f7b0 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/angular/reference/interfaces/QueryObserverPendingResult.md index f50812cdc65..62525143cba 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/angular/reference/interfaces/QueryObserverPlaceholderResult.md index 052c64bfe3f..4b5e0dd6255 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,11 +45,11 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/angular/reference/interfaces/QueryObserverRefetchErrorResult.md index 979f367ef1e..817635d9ab5 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,11 +44,11 @@ A query result in the `error` state when a refetch failed, so the data from befo | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/angular/reference/interfaces/QueryObserverSuccessResult.md index 16688e57090..f84e964078b 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverSuccessResult.md @@ -44,11 +44,11 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md index 83b064ee427..d535fc27aa2 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -51,7 +51,7 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `hasNextPage` | `boolean` | Will be `true` if there is a next page to be fetched (known via the `getNextPageParam` option). | | `hasPreviousPage` | `boolean` | Will be `true` if there is a previous page to be fetched (known via the `getPreviousPageParam` option). | | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index d5a9fa32d6a..0ce9371d230 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -52,11 +52,11 @@ An infinite query result in the `error` state when the first fetch failed, so th | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingResult.md index 54849053197..08bedcf2cb4 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPendingResult.md index c53ba2ef772..e3b464b8caf 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index fa34dcb4886..95bc9de5148 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,11 +53,11 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 7248dbe5602..969a6313b43 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,11 +53,11 @@ kept. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 23d3b10de06..026f0e7aa43 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,11 +52,11 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md index dcedb5a261b..ab4a91d9b33 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md @@ -43,7 +43,7 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/lit/reference/interfaces/QueryObserverLoadingErrorResult.md index a413c24e4d4..b5570ba9f0f 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -44,11 +44,11 @@ A query result in the `error` state when the first fetch failed, so there is no | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/lit/reference/interfaces/QueryObserverLoadingResult.md index f053574cd3d..a7cb783f7b0 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/lit/reference/interfaces/QueryObserverPendingResult.md index f50812cdc65..62525143cba 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/lit/reference/interfaces/QueryObserverPlaceholderResult.md index 052c64bfe3f..4b5e0dd6255 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,11 +45,11 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/lit/reference/interfaces/QueryObserverRefetchErrorResult.md index 979f367ef1e..817635d9ab5 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,11 +44,11 @@ A query result in the `error` state when a refetch failed, so the data from befo | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/lit/reference/interfaces/QueryObserverSuccessResult.md index 16688e57090..f84e964078b 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverSuccessResult.md @@ -44,11 +44,11 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/functions/useInfiniteQuery.md b/docs/framework/preact/reference/functions/useInfiniteQuery.md index d2fddb14c63..1782f06dc0b 100644 --- a/docs/framework/preact/reference/functions/useInfiniteQuery.md +++ b/docs/framework/preact/reference/functions/useInfiniteQuery.md @@ -554,7 +554,7 @@ The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchP | `hasNextPage` | `boolean` | Will be `true` if there is a next page to be fetched (known via the `getNextPageParam` option). | | `hasPreviousPage` | `boolean` | Will be `true` if there is a previous page to be fetched (known via the `getPreviousPageParam` option). | | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -566,11 +566,11 @@ The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchP | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/preact/reference/functions/useQuery.md b/docs/framework/preact/reference/functions/useQuery.md index 023cc25540f..f3d3c7919bb 100644 --- a/docs/framework/preact/reference/functions/useQuery.md +++ b/docs/framework/preact/reference/functions/useQuery.md @@ -493,7 +493,7 @@ convenience. | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -501,11 +501,11 @@ convenience. | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md index 83b064ee427..d535fc27aa2 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -51,7 +51,7 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `hasNextPage` | `boolean` | Will be `true` if there is a next page to be fetched (known via the `getNextPageParam` option). | | `hasPreviousPage` | `boolean` | Will be `true` if there is a previous page to be fetched (known via the `getPreviousPageParam` option). | | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index d5a9fa32d6a..0ce9371d230 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -52,11 +52,11 @@ An infinite query result in the `error` state when the first fetch failed, so th | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingResult.md index 54849053197..08bedcf2cb4 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPendingResult.md index c53ba2ef772..e3b464b8caf 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index fa34dcb4886..95bc9de5148 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,11 +53,11 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 7248dbe5602..969a6313b43 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,11 +53,11 @@ kept. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 23d3b10de06..026f0e7aa43 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,11 +52,11 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md index dcedb5a261b..ab4a91d9b33 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md @@ -43,7 +43,7 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/preact/reference/interfaces/QueryObserverLoadingErrorResult.md index a413c24e4d4..b5570ba9f0f 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -44,11 +44,11 @@ A query result in the `error` state when the first fetch failed, so there is no | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/preact/reference/interfaces/QueryObserverLoadingResult.md index f053574cd3d..a7cb783f7b0 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/preact/reference/interfaces/QueryObserverPendingResult.md index f50812cdc65..62525143cba 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/preact/reference/interfaces/QueryObserverPlaceholderResult.md index 052c64bfe3f..4b5e0dd6255 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,11 +45,11 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/preact/reference/interfaces/QueryObserverRefetchErrorResult.md index 979f367ef1e..817635d9ab5 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,11 +44,11 @@ A query result in the `error` state when a refetch failed, so the data from befo | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/preact/reference/interfaces/QueryObserverSuccessResult.md index 16688e57090..f84e964078b 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverSuccessResult.md @@ -44,11 +44,11 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/functions/useInfiniteQuery.md b/docs/framework/react/reference/functions/useInfiniteQuery.md index 7e9f2905c71..36b1ebd2974 100644 --- a/docs/framework/react/reference/functions/useInfiniteQuery.md +++ b/docs/framework/react/reference/functions/useInfiniteQuery.md @@ -556,7 +556,7 @@ The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchP | `hasNextPage` | `boolean` | Will be `true` if there is a next page to be fetched (known via the `getNextPageParam` option). | | `hasPreviousPage` | `boolean` | Will be `true` if there is a previous page to be fetched (known via the `getPreviousPageParam` option). | | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -568,11 +568,11 @@ The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchP | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/react/reference/functions/useQuery.md b/docs/framework/react/reference/functions/useQuery.md index 906fb028afe..30a8c111259 100644 --- a/docs/framework/react/reference/functions/useQuery.md +++ b/docs/framework/react/reference/functions/useQuery.md @@ -495,7 +495,7 @@ convenience. | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -503,11 +503,11 @@ convenience. | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md index 83b064ee427..d535fc27aa2 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -51,7 +51,7 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `hasNextPage` | `boolean` | Will be `true` if there is a next page to be fetched (known via the `getNextPageParam` option). | | `hasPreviousPage` | `boolean` | Will be `true` if there is a previous page to be fetched (known via the `getPreviousPageParam` option). | | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index d5a9fa32d6a..0ce9371d230 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -52,11 +52,11 @@ An infinite query result in the `error` state when the first fetch failed, so th | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingResult.md index 54849053197..08bedcf2cb4 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverPendingResult.md index c53ba2ef772..e3b464b8caf 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index fa34dcb4886..95bc9de5148 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,11 +53,11 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 7248dbe5602..969a6313b43 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,11 +53,11 @@ kept. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 23d3b10de06..026f0e7aa43 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,11 +52,11 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md index dcedb5a261b..ab4a91d9b33 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md @@ -43,7 +43,7 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/react/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/react/reference/interfaces/QueryObserverLoadingErrorResult.md index a413c24e4d4..b5570ba9f0f 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -44,11 +44,11 @@ A query result in the `error` state when the first fetch failed, so there is no | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/react/reference/interfaces/QueryObserverLoadingResult.md index f053574cd3d..a7cb783f7b0 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/react/reference/interfaces/QueryObserverPendingResult.md index f50812cdc65..62525143cba 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/react/reference/interfaces/QueryObserverPlaceholderResult.md index 052c64bfe3f..4b5e0dd6255 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,11 +45,11 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/react/reference/interfaces/QueryObserverRefetchErrorResult.md index 979f367ef1e..817635d9ab5 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,11 +44,11 @@ A query result in the `error` state when a refetch failed, so the data from befo | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/react/reference/interfaces/QueryObserverSuccessResult.md index 16688e57090..f84e964078b 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverSuccessResult.md @@ -44,11 +44,11 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/functions/useInfiniteQuery.md b/docs/framework/solid/reference/functions/useInfiniteQuery.md index a10d3598902..d0c4e10a421 100644 --- a/docs/framework/solid/reference/functions/useInfiniteQuery.md +++ b/docs/framework/solid/reference/functions/useInfiniteQuery.md @@ -330,7 +330,7 @@ The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchP | `hasNextPage` | `boolean` | Will be `true` if there is a next page to be fetched (known via the `getNextPageParam` option). | | `hasPreviousPage` | `boolean` | Will be `true` if there is a previous page to be fetched (known via the `getPreviousPageParam` option). | | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -342,11 +342,11 @@ The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchP | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/solid/reference/functions/useQuery.md b/docs/framework/solid/reference/functions/useQuery.md index a6a42b48f60..0f487637eb5 100644 --- a/docs/framework/solid/reference/functions/useQuery.md +++ b/docs/framework/solid/reference/functions/useQuery.md @@ -370,7 +370,7 @@ booleans for convenience. | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -378,11 +378,11 @@ booleans for convenience. | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md index 83b064ee427..d535fc27aa2 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -51,7 +51,7 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `hasNextPage` | `boolean` | Will be `true` if there is a next page to be fetched (known via the `getNextPageParam` option). | | `hasPreviousPage` | `boolean` | Will be `true` if there is a previous page to be fetched (known via the `getPreviousPageParam` option). | | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index d5a9fa32d6a..0ce9371d230 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -52,11 +52,11 @@ An infinite query result in the `error` state when the first fetch failed, so th | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingResult.md index 54849053197..08bedcf2cb4 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPendingResult.md index c53ba2ef772..e3b464b8caf 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index fa34dcb4886..95bc9de5148 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,11 +53,11 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 7248dbe5602..969a6313b43 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,11 +53,11 @@ kept. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 23d3b10de06..026f0e7aa43 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,11 +52,11 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md index dcedb5a261b..ab4a91d9b33 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md @@ -43,7 +43,7 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/solid/reference/interfaces/QueryObserverLoadingErrorResult.md index a413c24e4d4..b5570ba9f0f 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -44,11 +44,11 @@ A query result in the `error` state when the first fetch failed, so there is no | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/solid/reference/interfaces/QueryObserverLoadingResult.md index f053574cd3d..a7cb783f7b0 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/solid/reference/interfaces/QueryObserverPendingResult.md index f50812cdc65..62525143cba 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/solid/reference/interfaces/QueryObserverPlaceholderResult.md index 052c64bfe3f..4b5e0dd6255 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,11 +45,11 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/solid/reference/interfaces/QueryObserverRefetchErrorResult.md index 979f367ef1e..817635d9ab5 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,11 +44,11 @@ A query result in the `error` state when a refetch failed, so the data from befo | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/solid/reference/interfaces/QueryObserverSuccessResult.md index 16688e57090..f84e964078b 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverSuccessResult.md @@ -44,11 +44,11 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/functions/createInfiniteQuery.md b/docs/framework/svelte/reference/functions/createInfiniteQuery.md index 4fd12ddf739..df27262b924 100644 --- a/docs/framework/svelte/reference/functions/createInfiniteQuery.md +++ b/docs/framework/svelte/reference/functions/createInfiniteQuery.md @@ -380,7 +380,7 @@ to page through the query. | `hasNextPage` | `boolean` | Will be `true` if there is a next page to be fetched (known via the `getNextPageParam` option). | | `hasPreviousPage` | `boolean` | Will be `true` if there is a previous page to be fetched (known via the `getPreviousPageParam` option). | | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -392,11 +392,11 @@ to page through the query. | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/svelte/reference/functions/createQuery.md b/docs/framework/svelte/reference/functions/createQuery.md index b6cc54688dc..ff4be2435f8 100644 --- a/docs/framework/svelte/reference/functions/createQuery.md +++ b/docs/framework/svelte/reference/functions/createQuery.md @@ -458,7 +458,7 @@ convenience. | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -466,11 +466,11 @@ convenience. | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md index 83b064ee427..d535fc27aa2 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -51,7 +51,7 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `hasNextPage` | `boolean` | Will be `true` if there is a next page to be fetched (known via the `getNextPageParam` option). | | `hasPreviousPage` | `boolean` | Will be `true` if there is a previous page to be fetched (known via the `getPreviousPageParam` option). | | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index d5a9fa32d6a..0ce9371d230 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -52,11 +52,11 @@ An infinite query result in the `error` state when the first fetch failed, so th | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingResult.md index 54849053197..08bedcf2cb4 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPendingResult.md index c53ba2ef772..e3b464b8caf 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index fa34dcb4886..95bc9de5148 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,11 +53,11 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 7248dbe5602..969a6313b43 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,11 +53,11 @@ kept. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 23d3b10de06..026f0e7aa43 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,11 +52,11 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md index dcedb5a261b..ab4a91d9b33 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md @@ -43,7 +43,7 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverLoadingErrorResult.md index a413c24e4d4..b5570ba9f0f 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -44,11 +44,11 @@ A query result in the `error` state when the first fetch failed, so there is no | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverLoadingResult.md index f053574cd3d..a7cb783f7b0 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverPendingResult.md index f50812cdc65..62525143cba 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverPlaceholderResult.md index 052c64bfe3f..4b5e0dd6255 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,11 +45,11 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverRefetchErrorResult.md index 979f367ef1e..817635d9ab5 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,11 +44,11 @@ A query result in the `error` state when a refetch failed, so the data from befo | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverSuccessResult.md index 16688e57090..f84e964078b 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverSuccessResult.md @@ -44,11 +44,11 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md index 83b064ee427..d535fc27aa2 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -51,7 +51,7 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `hasNextPage` | `boolean` | Will be `true` if there is a next page to be fetched (known via the `getNextPageParam` option). | | `hasPreviousPage` | `boolean` | Will be `true` if there is a previous page to be fetched (known via the `getPreviousPageParam` option). | | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index d5a9fa32d6a..0ce9371d230 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -52,11 +52,11 @@ An infinite query result in the `error` state when the first fetch failed, so th | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingResult.md index 54849053197..08bedcf2cb4 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPendingResult.md index c53ba2ef772..e3b464b8caf 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index fa34dcb4886..95bc9de5148 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,11 +53,11 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 7248dbe5602..969a6313b43 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,11 +53,11 @@ kept. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 23d3b10de06..026f0e7aa43 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,11 +52,11 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md index dcedb5a261b..ab4a91d9b33 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md @@ -43,7 +43,7 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isError` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. | | `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. | @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isPending` | `boolean` | Will be `true` if the query has no data to display and no error. | | `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. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has data to display (including `placeholderData`) and no error. | | `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. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/vue/reference/interfaces/QueryObserverLoadingErrorResult.md index a413c24e4d4..b5570ba9f0f 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -44,11 +44,11 @@ A query result in the `error` state when the first fetch failed, so there is no | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/vue/reference/interfaces/QueryObserverLoadingResult.md index f053574cd3d..a7cb783f7b0 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/vue/reference/interfaces/QueryObserverPendingResult.md index f50812cdc65..62525143cba 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since there's no cached data and no query attempt has finished yet. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/vue/reference/interfaces/QueryObserverPlaceholderResult.md index 052c64bfe3f..4b5e0dd6255 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,11 +45,11 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/vue/reference/interfaces/QueryObserverRefetchErrorResult.md index 979f367ef1e..817635d9ab5 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,11 +44,11 @@ A query result in the `error` state when a refetch failed, so the data from befo | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"error"` | `'error'`, since the query attempt resulted in an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"error"` | `'error'`, since a fetch failed after its retries or `select` threw. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/vue/reference/interfaces/QueryObserverSuccessResult.md index 16688e57090..f84e964078b 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverSuccessResult.md @@ -44,11 +44,11 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data or a query attempt has finished. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has received a response with no errors and is ready to display its data. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/packages/query-core/src/types.ts b/packages/query-core/src/types.ts index fac9b158bb2..4cffd188d73 100644 --- a/packages/query-core/src/types.ts +++ b/packages/query-core/src/types.ts @@ -996,7 +996,7 @@ export interface QueryObserverBaseResult< errorUpdateCount: number /** * A derived boolean from the `status` variable, provided for convenience. - * - `true` if the query attempt resulted in an error. + * - `true` if the query has an error from a fetch that failed after its retries, or if `select` threw. */ isError: boolean /** @@ -1019,7 +1019,7 @@ export interface QueryObserverBaseResult< */ isLoading: boolean /** - * Will be `pending` if there's no cached data and no query attempt was finished yet. + * Will be `true` if the query has no data to display and no error. */ isPending: boolean /** @@ -1055,7 +1055,7 @@ export interface QueryObserverBaseResult< isStale: 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. + * - `true` if the query has data to display (including `placeholderData`) and no error. */ isSuccess: boolean /** @@ -1071,9 +1071,9 @@ export interface QueryObserverBaseResult< /** * 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. + * - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. + * - `success` if the query has data to display (including `placeholderData`) and no error. + * - `pending` otherwise, since the query has no data to display and no error. */ status: QueryStatus /** @@ -1106,7 +1106,7 @@ export interface QueryObserverPendingResult< */ isError: false /** - * `true`, since there's no cached data and no query attempt has finished yet. + * `true`, since the query has no data to display and no error. */ isPending: true /** @@ -1126,7 +1126,7 @@ export interface QueryObserverPendingResult< */ isPlaceholderData: false /** - * `'pending'`, since there's no cached data and no query attempt has finished yet. + * `'pending'`, since the query has no data to display and no error. */ status: 'pending' } @@ -1152,7 +1152,7 @@ export interface QueryObserverLoadingResult< */ isError: false /** - * `true`, since there's no cached data and no query attempt has finished yet. + * `true`, since the query has no data to display and no error. */ isPending: true /** @@ -1176,7 +1176,7 @@ export interface QueryObserverLoadingResult< */ isPlaceholderData: false /** - * `'pending'`, since there's no cached data and no query attempt has finished yet. + * `'pending'`, since the query has no data to display and no error. */ status: 'pending' } @@ -1201,7 +1201,7 @@ export interface QueryObserverLoadingErrorResult< */ isError: true /** - * `false`, since the query has data or a query attempt has finished. + * `false`, since the query has data to display or an error. */ isPending: false /** @@ -1225,7 +1225,7 @@ export interface QueryObserverLoadingErrorResult< */ isPlaceholderData: false /** - * `'error'`, since the query attempt resulted in an error. + * `'error'`, since a fetch failed after its retries or `select` threw. */ status: 'error' } @@ -1250,7 +1250,7 @@ export interface QueryObserverRefetchErrorResult< */ isError: true /** - * `false`, since the query has data or a query attempt has finished. + * `false`, since the query has data to display or an error. */ isPending: false /** @@ -1274,7 +1274,7 @@ export interface QueryObserverRefetchErrorResult< */ isPlaceholderData: false /** - * `'error'`, since the query attempt resulted in an error. + * `'error'`, since a fetch failed after its retries or `select` threw. */ status: 'error' } @@ -1299,7 +1299,7 @@ export interface QueryObserverSuccessResult< */ isError: false /** - * `false`, since the query has data or a query attempt has finished. + * `false`, since the query has data to display or an error. */ isPending: false /** @@ -1323,8 +1323,8 @@ export interface QueryObserverSuccessResult< */ isPlaceholderData: false /** - * `'success'`, since the query has received a response with no errors and is ready to display its - * data. + * `'success'`, since the query has data to display and no error from a fetch or from + * `select`. */ status: 'success' } @@ -1350,7 +1350,7 @@ export interface QueryObserverPlaceholderResult< */ error: null /** - * `false`, since the query has data or a query attempt has finished. + * `false`, since the query has data to display or an error. */ isPending: false /** @@ -1374,8 +1374,8 @@ export interface QueryObserverPlaceholderResult< */ isPlaceholderData: true /** - * `'success'`, since the query has received a response with no errors and is ready to display its - * data. + * `'success'`, since the query has data to display and no error from a fetch or from + * `select`. */ status: 'success' } @@ -1468,7 +1468,7 @@ export interface InfiniteQueryObserverPendingResult< */ isError: false /** - * `true`, since there's no cached data and no query attempt has finished yet. + * `true`, since the query has no data to display and no error. */ isPending: true /** @@ -1496,7 +1496,7 @@ export interface InfiniteQueryObserverPendingResult< */ isPlaceholderData: false /** - * `'pending'`, since there's no cached data and no query attempt has finished yet. + * `'pending'`, since the query has no data to display and no error. */ status: 'pending' } @@ -1522,7 +1522,7 @@ export interface InfiniteQueryObserverLoadingResult< */ isError: false /** - * `true`, since there's no cached data and no query attempt has finished yet. + * `true`, since the query has no data to display and no error. */ isPending: true /** @@ -1554,7 +1554,7 @@ export interface InfiniteQueryObserverLoadingResult< */ isPlaceholderData: false /** - * `'pending'`, since there's no cached data and no query attempt has finished yet. + * `'pending'`, since the query has no data to display and no error. */ status: 'pending' } @@ -1579,7 +1579,7 @@ export interface InfiniteQueryObserverLoadingErrorResult< */ isError: true /** - * `false`, since the query has data or a query attempt has finished. + * `false`, since the query has data to display or an error. */ isPending: false /** @@ -1611,7 +1611,7 @@ export interface InfiniteQueryObserverLoadingErrorResult< */ isPlaceholderData: false /** - * `'error'`, since the query attempt resulted in an error. + * `'error'`, since a fetch failed after its retries or `select` threw. */ status: 'error' } @@ -1637,7 +1637,7 @@ export interface InfiniteQueryObserverRefetchErrorResult< */ isError: true /** - * `false`, since the query has data or a query attempt has finished. + * `false`, since the query has data to display or an error. */ isPending: false /** @@ -1661,7 +1661,7 @@ export interface InfiniteQueryObserverRefetchErrorResult< */ isPlaceholderData: false /** - * `'error'`, since the query attempt resulted in an error. + * `'error'`, since a fetch failed after its retries or `select` threw. */ status: 'error' } @@ -1686,7 +1686,7 @@ export interface InfiniteQueryObserverSuccessResult< */ isError: false /** - * `false`, since the query has data or a query attempt has finished. + * `false`, since the query has data to display or an error. */ isPending: false /** @@ -1718,8 +1718,8 @@ export interface InfiniteQueryObserverSuccessResult< */ isPlaceholderData: false /** - * `'success'`, since the query has received a response with no errors and is ready to display its - * data. + * `'success'`, since the query has data to display and no error from a fetch or from + * `select`. */ status: 'success' } @@ -1745,7 +1745,7 @@ export interface InfiniteQueryObserverPlaceholderResult< */ error: null /** - * `false`, since the query has data or a query attempt has finished. + * `false`, since the query has data to display or an error. */ isPending: false /** @@ -1777,8 +1777,8 @@ export interface InfiniteQueryObserverPlaceholderResult< */ isFetchPreviousPageError: false /** - * `'success'`, since the query has received a response with no errors and is ready to display its - * data. + * `'success'`, since the query has data to display and no error from a fetch or from + * `select`. */ status: 'success' } From 8dba2ecdedb4e72171ec0c3097f18be4d9aef708 Mon Sep 17 00:00:00 2001 From: Wonsuk Choi Date: Sat, 14 Nov 2026 21:49:24 +0900 Subject: [PATCH 2/5] docs(query-core/types): describe 'isLoadingError', 'isRefetchError' and the error result types by the current data and error, including 'select' failures --- .../InfiniteQueryObserverBaseResult.md | 4 +- ...InfiniteQueryObserverLoadingErrorResult.md | 8 ++-- ...InfiniteQueryObserverRefetchErrorResult.md | 10 ++--- .../interfaces/QueryObserverBaseResult.md | 4 +- .../QueryObserverLoadingErrorResult.md | 8 ++-- .../QueryObserverRefetchErrorResult.md | 8 ++-- .../InfiniteQueryObserverBaseResult.md | 4 +- ...InfiniteQueryObserverLoadingErrorResult.md | 8 ++-- ...InfiniteQueryObserverRefetchErrorResult.md | 10 ++--- .../interfaces/QueryObserverBaseResult.md | 4 +- .../QueryObserverLoadingErrorResult.md | 8 ++-- .../QueryObserverRefetchErrorResult.md | 8 ++-- .../reference/functions/useInfiniteQuery.md | 4 +- .../preact/reference/functions/useQuery.md | 4 +- .../InfiniteQueryObserverBaseResult.md | 4 +- ...InfiniteQueryObserverLoadingErrorResult.md | 8 ++-- ...InfiniteQueryObserverRefetchErrorResult.md | 10 ++--- .../interfaces/QueryObserverBaseResult.md | 4 +- .../QueryObserverLoadingErrorResult.md | 8 ++-- .../QueryObserverRefetchErrorResult.md | 8 ++-- .../reference/functions/useInfiniteQuery.md | 4 +- .../react/reference/functions/useQuery.md | 4 +- .../InfiniteQueryObserverBaseResult.md | 4 +- ...InfiniteQueryObserverLoadingErrorResult.md | 8 ++-- ...InfiniteQueryObserverRefetchErrorResult.md | 10 ++--- .../interfaces/QueryObserverBaseResult.md | 4 +- .../QueryObserverLoadingErrorResult.md | 8 ++-- .../QueryObserverRefetchErrorResult.md | 8 ++-- .../reference/functions/useInfiniteQuery.md | 4 +- .../solid/reference/functions/useQuery.md | 4 +- .../InfiniteQueryObserverBaseResult.md | 4 +- ...InfiniteQueryObserverLoadingErrorResult.md | 8 ++-- ...InfiniteQueryObserverRefetchErrorResult.md | 10 ++--- .../interfaces/QueryObserverBaseResult.md | 4 +- .../QueryObserverLoadingErrorResult.md | 8 ++-- .../QueryObserverRefetchErrorResult.md | 8 ++-- .../functions/createInfiniteQuery.md | 4 +- .../svelte/reference/functions/createQuery.md | 4 +- .../InfiniteQueryObserverBaseResult.md | 4 +- ...InfiniteQueryObserverLoadingErrorResult.md | 8 ++-- ...InfiniteQueryObserverRefetchErrorResult.md | 10 ++--- .../interfaces/QueryObserverBaseResult.md | 4 +- .../QueryObserverLoadingErrorResult.md | 8 ++-- .../QueryObserverRefetchErrorResult.md | 8 ++-- .../InfiniteQueryObserverBaseResult.md | 4 +- ...InfiniteQueryObserverLoadingErrorResult.md | 8 ++-- ...InfiniteQueryObserverRefetchErrorResult.md | 10 ++--- .../interfaces/QueryObserverBaseResult.md | 4 +- .../QueryObserverLoadingErrorResult.md | 8 ++-- .../QueryObserverRefetchErrorResult.md | 8 ++-- packages/query-core/src/types.ts | 38 +++++++++---------- 51 files changed, 182 insertions(+), 182 deletions(-) diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md index d535fc27aa2..f069ebc76cc 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -61,11 +61,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `isFetchPreviousPageError` | `boolean` | Will be `true` if the query failed while fetching the previous page. | | ~~`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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index 0ce9371d230..03cfb128b8e 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -7,7 +7,7 @@ title: InfiniteQueryObserverLoadingErrorResult Defined in: [packages/query-core/src/types.ts:1565](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1565) -An infinite query result in the `error` state when the first fetch failed, so there is no data. +An infinite query result in the `error` state with no data to display, since a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ An infinite query result in the `error` state when the first fetch failed, so th | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since the first fetch failed before any data was cached. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the first fetch failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `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. | - | @@ -50,7 +50,7 @@ An infinite query result in the `error` state when the first fetch failed, so th | `isFetchPreviousPageError` | `false` | `false`, since fetching the previous page didn't fail. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isFetchPreviousPageError`](InfiniteQueryObserverBaseResult.md#property-isfetchpreviouspageerror) | | ~~`isInitialLoading`~~ | `boolean` | **Deprecated** `isInitialLoading` is being deprecated in favor of `isLoading` and will be removed in the next major version. | - | | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | -| `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | +| `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 969a6313b43..4e78c914f1c 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -7,8 +7,8 @@ title: InfiniteQueryObserverRefetchErrorResult Defined in: [packages/query-core/src/types.ts:1623](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1623) -An infinite query result in the `error` state when a refetch failed, so the data from before is -kept. +An infinite query result in the `error` state that keeps the data from before a fetch or `select` +failed. ## Extends @@ -28,9 +28,9 @@ kept. | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `TData` | The data from before the failed refetch, which is kept. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `TData` | The data from before the fetch or `select` failed, which is kept. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the refetch failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `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. | - | @@ -55,7 +55,7 @@ kept. | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md index ab4a91d9b33..d6c55666575 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md @@ -49,11 +49,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/angular/reference/interfaces/QueryObserverLoadingErrorResult.md index b5570ba9f0f..47c4f501789 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -7,7 +7,7 @@ title: QueryObserverLoadingErrorResult Defined in: [packages/query-core/src/types.ts:1187](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1187) -A query result in the `error` state when the first fetch failed, so there is no data. +A query result in the `error` state with no data to display, since a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ A query result in the `error` state when the first fetch failed, so there is no | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since the first fetch failed before any data was cached. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the first fetch failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `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. | - | @@ -42,7 +42,7 @@ A query result in the `error` state when the first fetch failed, so there is no | `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` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | -| `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | +| `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/angular/reference/interfaces/QueryObserverRefetchErrorResult.md index 817635d9ab5..16dfc2f8b9d 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -7,7 +7,7 @@ title: QueryObserverRefetchErrorResult Defined in: [packages/query-core/src/types.ts:1236](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1236) -A query result in the `error` state when a refetch failed, so the data from before is kept. +A query result in the `error` state that keeps the data from before a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ A query result in the `error` state when a refetch failed, so the data from befo | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `TData` | The data from before the failed refetch, which is kept. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `TData` | The data from before the fetch or `select` failed, which is kept. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the refetch failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `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. | - | @@ -46,7 +46,7 @@ A query result in the `error` state when a refetch failed, so the data from befo | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md index d535fc27aa2..f069ebc76cc 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -61,11 +61,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `isFetchPreviousPageError` | `boolean` | Will be `true` if the query failed while fetching the previous page. | | ~~`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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index 0ce9371d230..03cfb128b8e 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -7,7 +7,7 @@ title: InfiniteQueryObserverLoadingErrorResult Defined in: [packages/query-core/src/types.ts:1565](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1565) -An infinite query result in the `error` state when the first fetch failed, so there is no data. +An infinite query result in the `error` state with no data to display, since a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ An infinite query result in the `error` state when the first fetch failed, so th | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since the first fetch failed before any data was cached. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the first fetch failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `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. | - | @@ -50,7 +50,7 @@ An infinite query result in the `error` state when the first fetch failed, so th | `isFetchPreviousPageError` | `false` | `false`, since fetching the previous page didn't fail. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isFetchPreviousPageError`](InfiniteQueryObserverBaseResult.md#property-isfetchpreviouspageerror) | | ~~`isInitialLoading`~~ | `boolean` | **Deprecated** `isInitialLoading` is being deprecated in favor of `isLoading` and will be removed in the next major version. | - | | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | -| `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | +| `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 969a6313b43..4e78c914f1c 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -7,8 +7,8 @@ title: InfiniteQueryObserverRefetchErrorResult Defined in: [packages/query-core/src/types.ts:1623](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1623) -An infinite query result in the `error` state when a refetch failed, so the data from before is -kept. +An infinite query result in the `error` state that keeps the data from before a fetch or `select` +failed. ## Extends @@ -28,9 +28,9 @@ kept. | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `TData` | The data from before the failed refetch, which is kept. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `TData` | The data from before the fetch or `select` failed, which is kept. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the refetch failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `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. | - | @@ -55,7 +55,7 @@ kept. | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md index ab4a91d9b33..d6c55666575 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md @@ -49,11 +49,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/lit/reference/interfaces/QueryObserverLoadingErrorResult.md index b5570ba9f0f..47c4f501789 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -7,7 +7,7 @@ title: QueryObserverLoadingErrorResult Defined in: [packages/query-core/src/types.ts:1187](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1187) -A query result in the `error` state when the first fetch failed, so there is no data. +A query result in the `error` state with no data to display, since a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ A query result in the `error` state when the first fetch failed, so there is no | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since the first fetch failed before any data was cached. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the first fetch failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `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. | - | @@ -42,7 +42,7 @@ A query result in the `error` state when the first fetch failed, so there is no | `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` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | -| `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | +| `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/lit/reference/interfaces/QueryObserverRefetchErrorResult.md index 817635d9ab5..16dfc2f8b9d 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -7,7 +7,7 @@ title: QueryObserverRefetchErrorResult Defined in: [packages/query-core/src/types.ts:1236](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1236) -A query result in the `error` state when a refetch failed, so the data from before is kept. +A query result in the `error` state that keeps the data from before a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ A query result in the `error` state when a refetch failed, so the data from befo | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `TData` | The data from before the failed refetch, which is kept. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `TData` | The data from before the fetch or `select` failed, which is kept. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the refetch failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `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. | - | @@ -46,7 +46,7 @@ A query result in the `error` state when a refetch failed, so the data from befo | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/preact/reference/functions/useInfiniteQuery.md b/docs/framework/preact/reference/functions/useInfiniteQuery.md index 1782f06dc0b..df7e804f254 100644 --- a/docs/framework/preact/reference/functions/useInfiniteQuery.md +++ b/docs/framework/preact/reference/functions/useInfiniteQuery.md @@ -564,11 +564,11 @@ The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchP | `isFetchPreviousPageError` | `boolean` | Will be `true` if the query failed while fetching the previous page. | | ~~`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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/preact/reference/functions/useQuery.md b/docs/framework/preact/reference/functions/useQuery.md index f3d3c7919bb..9f2ef899d0e 100644 --- a/docs/framework/preact/reference/functions/useQuery.md +++ b/docs/framework/preact/reference/functions/useQuery.md @@ -499,11 +499,11 @@ convenience. | `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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md index d535fc27aa2..f069ebc76cc 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -61,11 +61,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `isFetchPreviousPageError` | `boolean` | Will be `true` if the query failed while fetching the previous page. | | ~~`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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index 0ce9371d230..03cfb128b8e 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -7,7 +7,7 @@ title: InfiniteQueryObserverLoadingErrorResult Defined in: [packages/query-core/src/types.ts:1565](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1565) -An infinite query result in the `error` state when the first fetch failed, so there is no data. +An infinite query result in the `error` state with no data to display, since a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ An infinite query result in the `error` state when the first fetch failed, so th | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since the first fetch failed before any data was cached. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the first fetch failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `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. | - | @@ -50,7 +50,7 @@ An infinite query result in the `error` state when the first fetch failed, so th | `isFetchPreviousPageError` | `false` | `false`, since fetching the previous page didn't fail. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isFetchPreviousPageError`](InfiniteQueryObserverBaseResult.md#property-isfetchpreviouspageerror) | | ~~`isInitialLoading`~~ | `boolean` | **Deprecated** `isInitialLoading` is being deprecated in favor of `isLoading` and will be removed in the next major version. | - | | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | -| `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | +| `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 969a6313b43..4e78c914f1c 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -7,8 +7,8 @@ title: InfiniteQueryObserverRefetchErrorResult Defined in: [packages/query-core/src/types.ts:1623](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1623) -An infinite query result in the `error` state when a refetch failed, so the data from before is -kept. +An infinite query result in the `error` state that keeps the data from before a fetch or `select` +failed. ## Extends @@ -28,9 +28,9 @@ kept. | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `TData` | The data from before the failed refetch, which is kept. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `TData` | The data from before the fetch or `select` failed, which is kept. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the refetch failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `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. | - | @@ -55,7 +55,7 @@ kept. | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md index ab4a91d9b33..d6c55666575 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md @@ -49,11 +49,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/preact/reference/interfaces/QueryObserverLoadingErrorResult.md index b5570ba9f0f..47c4f501789 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -7,7 +7,7 @@ title: QueryObserverLoadingErrorResult Defined in: [packages/query-core/src/types.ts:1187](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1187) -A query result in the `error` state when the first fetch failed, so there is no data. +A query result in the `error` state with no data to display, since a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ A query result in the `error` state when the first fetch failed, so there is no | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since the first fetch failed before any data was cached. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the first fetch failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `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. | - | @@ -42,7 +42,7 @@ A query result in the `error` state when the first fetch failed, so there is no | `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` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | -| `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | +| `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/preact/reference/interfaces/QueryObserverRefetchErrorResult.md index 817635d9ab5..16dfc2f8b9d 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -7,7 +7,7 @@ title: QueryObserverRefetchErrorResult Defined in: [packages/query-core/src/types.ts:1236](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1236) -A query result in the `error` state when a refetch failed, so the data from before is kept. +A query result in the `error` state that keeps the data from before a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ A query result in the `error` state when a refetch failed, so the data from befo | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `TData` | The data from before the failed refetch, which is kept. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `TData` | The data from before the fetch or `select` failed, which is kept. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the refetch failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `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. | - | @@ -46,7 +46,7 @@ A query result in the `error` state when a refetch failed, so the data from befo | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/react/reference/functions/useInfiniteQuery.md b/docs/framework/react/reference/functions/useInfiniteQuery.md index 36b1ebd2974..070dc51e5c6 100644 --- a/docs/framework/react/reference/functions/useInfiniteQuery.md +++ b/docs/framework/react/reference/functions/useInfiniteQuery.md @@ -566,11 +566,11 @@ The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchP | `isFetchPreviousPageError` | `boolean` | Will be `true` if the query failed while fetching the previous page. | | ~~`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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/react/reference/functions/useQuery.md b/docs/framework/react/reference/functions/useQuery.md index 30a8c111259..22ea03e638e 100644 --- a/docs/framework/react/reference/functions/useQuery.md +++ b/docs/framework/react/reference/functions/useQuery.md @@ -501,11 +501,11 @@ convenience. | `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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md index d535fc27aa2..f069ebc76cc 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -61,11 +61,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `isFetchPreviousPageError` | `boolean` | Will be `true` if the query failed while fetching the previous page. | | ~~`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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index 0ce9371d230..03cfb128b8e 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -7,7 +7,7 @@ title: InfiniteQueryObserverLoadingErrorResult Defined in: [packages/query-core/src/types.ts:1565](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1565) -An infinite query result in the `error` state when the first fetch failed, so there is no data. +An infinite query result in the `error` state with no data to display, since a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ An infinite query result in the `error` state when the first fetch failed, so th | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since the first fetch failed before any data was cached. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the first fetch failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `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. | - | @@ -50,7 +50,7 @@ An infinite query result in the `error` state when the first fetch failed, so th | `isFetchPreviousPageError` | `false` | `false`, since fetching the previous page didn't fail. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isFetchPreviousPageError`](InfiniteQueryObserverBaseResult.md#property-isfetchpreviouspageerror) | | ~~`isInitialLoading`~~ | `boolean` | **Deprecated** `isInitialLoading` is being deprecated in favor of `isLoading` and will be removed in the next major version. | - | | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | -| `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | +| `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 969a6313b43..4e78c914f1c 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -7,8 +7,8 @@ title: InfiniteQueryObserverRefetchErrorResult Defined in: [packages/query-core/src/types.ts:1623](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1623) -An infinite query result in the `error` state when a refetch failed, so the data from before is -kept. +An infinite query result in the `error` state that keeps the data from before a fetch or `select` +failed. ## Extends @@ -28,9 +28,9 @@ kept. | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `TData` | The data from before the failed refetch, which is kept. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `TData` | The data from before the fetch or `select` failed, which is kept. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the refetch failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `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. | - | @@ -55,7 +55,7 @@ kept. | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md index ab4a91d9b33..d6c55666575 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md @@ -49,11 +49,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/react/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/react/reference/interfaces/QueryObserverLoadingErrorResult.md index b5570ba9f0f..47c4f501789 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -7,7 +7,7 @@ title: QueryObserverLoadingErrorResult Defined in: [packages/query-core/src/types.ts:1187](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1187) -A query result in the `error` state when the first fetch failed, so there is no data. +A query result in the `error` state with no data to display, since a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ A query result in the `error` state when the first fetch failed, so there is no | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since the first fetch failed before any data was cached. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the first fetch failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `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. | - | @@ -42,7 +42,7 @@ A query result in the `error` state when the first fetch failed, so there is no | `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` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | -| `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | +| `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | diff --git a/docs/framework/react/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/react/reference/interfaces/QueryObserverRefetchErrorResult.md index 817635d9ab5..16dfc2f8b9d 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -7,7 +7,7 @@ title: QueryObserverRefetchErrorResult Defined in: [packages/query-core/src/types.ts:1236](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1236) -A query result in the `error` state when a refetch failed, so the data from before is kept. +A query result in the `error` state that keeps the data from before a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ A query result in the `error` state when a refetch failed, so the data from befo | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `TData` | The data from before the failed refetch, which is kept. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `TData` | The data from before the fetch or `select` failed, which is kept. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the refetch failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `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. | - | @@ -46,7 +46,7 @@ A query result in the `error` state when a refetch failed, so the data from befo | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/solid/reference/functions/useInfiniteQuery.md b/docs/framework/solid/reference/functions/useInfiniteQuery.md index d0c4e10a421..0201ecb2a6e 100644 --- a/docs/framework/solid/reference/functions/useInfiniteQuery.md +++ b/docs/framework/solid/reference/functions/useInfiniteQuery.md @@ -340,11 +340,11 @@ The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchP | `isFetchPreviousPageError` | `boolean` | Will be `true` if the query failed while fetching the previous page. | | ~~`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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/solid/reference/functions/useQuery.md b/docs/framework/solid/reference/functions/useQuery.md index 0f487637eb5..578614617ea 100644 --- a/docs/framework/solid/reference/functions/useQuery.md +++ b/docs/framework/solid/reference/functions/useQuery.md @@ -376,11 +376,11 @@ booleans for convenience. | `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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md index d535fc27aa2..f069ebc76cc 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -61,11 +61,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `isFetchPreviousPageError` | `boolean` | Will be `true` if the query failed while fetching the previous page. | | ~~`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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index 0ce9371d230..03cfb128b8e 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -7,7 +7,7 @@ title: InfiniteQueryObserverLoadingErrorResult Defined in: [packages/query-core/src/types.ts:1565](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1565) -An infinite query result in the `error` state when the first fetch failed, so there is no data. +An infinite query result in the `error` state with no data to display, since a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ An infinite query result in the `error` state when the first fetch failed, so th | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since the first fetch failed before any data was cached. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the first fetch failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `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. | - | @@ -50,7 +50,7 @@ An infinite query result in the `error` state when the first fetch failed, so th | `isFetchPreviousPageError` | `false` | `false`, since fetching the previous page didn't fail. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isFetchPreviousPageError`](InfiniteQueryObserverBaseResult.md#property-isfetchpreviouspageerror) | | ~~`isInitialLoading`~~ | `boolean` | **Deprecated** `isInitialLoading` is being deprecated in favor of `isLoading` and will be removed in the next major version. | - | | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | -| `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | +| `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 969a6313b43..4e78c914f1c 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -7,8 +7,8 @@ title: InfiniteQueryObserverRefetchErrorResult Defined in: [packages/query-core/src/types.ts:1623](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1623) -An infinite query result in the `error` state when a refetch failed, so the data from before is -kept. +An infinite query result in the `error` state that keeps the data from before a fetch or `select` +failed. ## Extends @@ -28,9 +28,9 @@ kept. | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `TData` | The data from before the failed refetch, which is kept. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `TData` | The data from before the fetch or `select` failed, which is kept. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the refetch failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `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. | - | @@ -55,7 +55,7 @@ kept. | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md index ab4a91d9b33..d6c55666575 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md @@ -49,11 +49,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/solid/reference/interfaces/QueryObserverLoadingErrorResult.md index b5570ba9f0f..47c4f501789 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -7,7 +7,7 @@ title: QueryObserverLoadingErrorResult Defined in: [packages/query-core/src/types.ts:1187](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1187) -A query result in the `error` state when the first fetch failed, so there is no data. +A query result in the `error` state with no data to display, since a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ A query result in the `error` state when the first fetch failed, so there is no | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since the first fetch failed before any data was cached. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the first fetch failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `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. | - | @@ -42,7 +42,7 @@ A query result in the `error` state when the first fetch failed, so there is no | `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` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | -| `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | +| `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/solid/reference/interfaces/QueryObserverRefetchErrorResult.md index 817635d9ab5..16dfc2f8b9d 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -7,7 +7,7 @@ title: QueryObserverRefetchErrorResult Defined in: [packages/query-core/src/types.ts:1236](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1236) -A query result in the `error` state when a refetch failed, so the data from before is kept. +A query result in the `error` state that keeps the data from before a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ A query result in the `error` state when a refetch failed, so the data from befo | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `TData` | The data from before the failed refetch, which is kept. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `TData` | The data from before the fetch or `select` failed, which is kept. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the refetch failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `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. | - | @@ -46,7 +46,7 @@ A query result in the `error` state when a refetch failed, so the data from befo | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/svelte/reference/functions/createInfiniteQuery.md b/docs/framework/svelte/reference/functions/createInfiniteQuery.md index df27262b924..5098622d8c4 100644 --- a/docs/framework/svelte/reference/functions/createInfiniteQuery.md +++ b/docs/framework/svelte/reference/functions/createInfiniteQuery.md @@ -390,11 +390,11 @@ to page through the query. | `isFetchPreviousPageError` | `boolean` | Will be `true` if the query failed while fetching the previous page. | | ~~`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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/svelte/reference/functions/createQuery.md b/docs/framework/svelte/reference/functions/createQuery.md index ff4be2435f8..551e09e1834 100644 --- a/docs/framework/svelte/reference/functions/createQuery.md +++ b/docs/framework/svelte/reference/functions/createQuery.md @@ -464,11 +464,11 @@ convenience. | `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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md index d535fc27aa2..f069ebc76cc 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -61,11 +61,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `isFetchPreviousPageError` | `boolean` | Will be `true` if the query failed while fetching the previous page. | | ~~`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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index 0ce9371d230..03cfb128b8e 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -7,7 +7,7 @@ title: InfiniteQueryObserverLoadingErrorResult Defined in: [packages/query-core/src/types.ts:1565](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1565) -An infinite query result in the `error` state when the first fetch failed, so there is no data. +An infinite query result in the `error` state with no data to display, since a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ An infinite query result in the `error` state when the first fetch failed, so th | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since the first fetch failed before any data was cached. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the first fetch failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `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. | - | @@ -50,7 +50,7 @@ An infinite query result in the `error` state when the first fetch failed, so th | `isFetchPreviousPageError` | `false` | `false`, since fetching the previous page didn't fail. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isFetchPreviousPageError`](InfiniteQueryObserverBaseResult.md#property-isfetchpreviouspageerror) | | ~~`isInitialLoading`~~ | `boolean` | **Deprecated** `isInitialLoading` is being deprecated in favor of `isLoading` and will be removed in the next major version. | - | | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | -| `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | +| `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 969a6313b43..4e78c914f1c 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -7,8 +7,8 @@ title: InfiniteQueryObserverRefetchErrorResult Defined in: [packages/query-core/src/types.ts:1623](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1623) -An infinite query result in the `error` state when a refetch failed, so the data from before is -kept. +An infinite query result in the `error` state that keeps the data from before a fetch or `select` +failed. ## Extends @@ -28,9 +28,9 @@ kept. | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `TData` | The data from before the failed refetch, which is kept. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `TData` | The data from before the fetch or `select` failed, which is kept. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the refetch failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `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. | - | @@ -55,7 +55,7 @@ kept. | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md index ab4a91d9b33..d6c55666575 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md @@ -49,11 +49,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverLoadingErrorResult.md index b5570ba9f0f..47c4f501789 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -7,7 +7,7 @@ title: QueryObserverLoadingErrorResult Defined in: [packages/query-core/src/types.ts:1187](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1187) -A query result in the `error` state when the first fetch failed, so there is no data. +A query result in the `error` state with no data to display, since a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ A query result in the `error` state when the first fetch failed, so there is no | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since the first fetch failed before any data was cached. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the first fetch failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `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. | - | @@ -42,7 +42,7 @@ A query result in the `error` state when the first fetch failed, so there is no | `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` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | -| `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | +| `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverRefetchErrorResult.md index 817635d9ab5..16dfc2f8b9d 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -7,7 +7,7 @@ title: QueryObserverRefetchErrorResult Defined in: [packages/query-core/src/types.ts:1236](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1236) -A query result in the `error` state when a refetch failed, so the data from before is kept. +A query result in the `error` state that keeps the data from before a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ A query result in the `error` state when a refetch failed, so the data from befo | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `TData` | The data from before the failed refetch, which is kept. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `TData` | The data from before the fetch or `select` failed, which is kept. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the refetch failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `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. | - | @@ -46,7 +46,7 @@ A query result in the `error` state when a refetch failed, so the data from befo | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md index d535fc27aa2..f069ebc76cc 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -61,11 +61,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `isFetchPreviousPageError` | `boolean` | Will be `true` if the query failed while fetching the previous page. | | ~~`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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index 0ce9371d230..03cfb128b8e 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -7,7 +7,7 @@ title: InfiniteQueryObserverLoadingErrorResult Defined in: [packages/query-core/src/types.ts:1565](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1565) -An infinite query result in the `error` state when the first fetch failed, so there is no data. +An infinite query result in the `error` state with no data to display, since a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ An infinite query result in the `error` state when the first fetch failed, so th | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since the first fetch failed before any data was cached. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the first fetch failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `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. | - | @@ -50,7 +50,7 @@ An infinite query result in the `error` state when the first fetch failed, so th | `isFetchPreviousPageError` | `false` | `false`, since fetching the previous page didn't fail. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isFetchPreviousPageError`](InfiniteQueryObserverBaseResult.md#property-isfetchpreviouspageerror) | | ~~`isInitialLoading`~~ | `boolean` | **Deprecated** `isInitialLoading` is being deprecated in favor of `isLoading` and will be removed in the next major version. | - | | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | -| `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | +| `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 969a6313b43..4e78c914f1c 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -7,8 +7,8 @@ title: InfiniteQueryObserverRefetchErrorResult Defined in: [packages/query-core/src/types.ts:1623](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1623) -An infinite query result in the `error` state when a refetch failed, so the data from before is -kept. +An infinite query result in the `error` state that keeps the data from before a fetch or `select` +failed. ## Extends @@ -28,9 +28,9 @@ kept. | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `TData` | The data from before the failed refetch, which is kept. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `TData` | The data from before the fetch or `select` failed, which is kept. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the refetch failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `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. | - | @@ -55,7 +55,7 @@ kept. | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md index ab4a91d9b33..d6c55666575 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md @@ -49,11 +49,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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. | +| `isLoadingError` | `boolean` | Will be `true` if the query has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query failed while refetching. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/vue/reference/interfaces/QueryObserverLoadingErrorResult.md index b5570ba9f0f..47c4f501789 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -7,7 +7,7 @@ title: QueryObserverLoadingErrorResult Defined in: [packages/query-core/src/types.ts:1187](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1187) -A query result in the `error` state when the first fetch failed, so there is no data. +A query result in the `error` state with no data to display, since a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ A query result in the `error` state when the first fetch failed, so there is no | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since the first fetch failed before any data was cached. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the first fetch failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `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. | - | @@ -42,7 +42,7 @@ A query result in the `error` state when the first fetch failed, so there is no | `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` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | -| `isLoadingError` | `true` | `true`, since the query failed while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | +| `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/vue/reference/interfaces/QueryObserverRefetchErrorResult.md index 817635d9ab5..16dfc2f8b9d 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -7,7 +7,7 @@ title: QueryObserverRefetchErrorResult Defined in: [packages/query-core/src/types.ts:1236](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L1236) -A query result in the `error` state when a refetch failed, so the data from before is kept. +A query result in the `error` state that keeps the data from before a fetch or `select` failed. ## Extends @@ -27,9 +27,9 @@ A query result in the `error` state when a refetch failed, so the data from befo | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `TData` | The data from before the failed refetch, which is kept. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `TData` | The data from before the fetch or `select` failed, which is kept. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | -| `error` | `TError` | The error the refetch failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | +| `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `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. | - | @@ -46,7 +46,7 @@ A query result in the `error` state when a refetch failed, so the data from befo | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query failed while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | diff --git a/packages/query-core/src/types.ts b/packages/query-core/src/types.ts index 4cffd188d73..5527411a55b 100644 --- a/packages/query-core/src/types.ts +++ b/packages/query-core/src/types.ts @@ -1023,7 +1023,7 @@ export interface QueryObserverBaseResult< */ isPending: boolean /** - * Will be `true` if the query failed while fetching for the first time. + * Will be `true` if the query has an error and no data to display. */ isLoadingError: boolean /** @@ -1041,7 +1041,7 @@ export interface QueryObserverBaseResult< */ isPlaceholderData: boolean /** - * Will be `true` if the query failed while refetching. + * Will be `true` if the query has an error and still has data to display. */ isRefetchError: boolean /** @@ -1182,18 +1182,18 @@ export interface QueryObserverLoadingResult< } /** - * A query result in the `error` state when the first fetch failed, so there is no data. + * A query result in the `error` state with no data to display, since a fetch or `select` failed. */ export interface QueryObserverLoadingErrorResult< TData = unknown, TError = DefaultError, > extends QueryObserverBaseResult { /** - * `undefined`, since the first fetch failed before any data was cached. + * `undefined`, since a fetch or `select` failed before there was data to display. */ data: undefined /** - * The error the first fetch failed with. + * The error the fetch or `select` failed with. */ error: TError /** @@ -1209,7 +1209,7 @@ export interface QueryObserverLoadingErrorResult< */ isLoading: false /** - * `true`, since the query failed while fetching for the first time. + * `true`, since the query has an error and no data to display. */ isLoadingError: true /** @@ -1231,18 +1231,18 @@ export interface QueryObserverLoadingErrorResult< } /** - * A query result in the `error` state when a refetch failed, so the data from before is kept. + * A query result in the `error` state that keeps the data from before a fetch or `select` failed. */ export interface QueryObserverRefetchErrorResult< TData = unknown, TError = DefaultError, > extends QueryObserverBaseResult { /** - * The data from before the failed refetch, which is kept. + * The data from before the fetch or `select` failed, which is kept. */ data: TData /** - * The error the refetch failed with. + * The error the fetch or `select` failed with. */ error: TError /** @@ -1262,7 +1262,7 @@ export interface QueryObserverRefetchErrorResult< */ isLoadingError: false /** - * `true`, since the query failed while refetching. + * `true`, since the query has an error and still has data to display. */ isRefetchError: true /** @@ -1560,18 +1560,18 @@ export interface InfiniteQueryObserverLoadingResult< } /** - * An infinite query result in the `error` state when the first fetch failed, so there is no data. + * An infinite query result in the `error` state with no data to display, since a fetch or `select` failed. */ export interface InfiniteQueryObserverLoadingErrorResult< TData = unknown, TError = DefaultError, > extends InfiniteQueryObserverBaseResult { /** - * `undefined`, since the first fetch failed before any data was cached. + * `undefined`, since a fetch or `select` failed before there was data to display. */ data: undefined /** - * The error the first fetch failed with. + * The error the fetch or `select` failed with. */ error: TError /** @@ -1587,7 +1587,7 @@ export interface InfiniteQueryObserverLoadingErrorResult< */ isLoading: false /** - * `true`, since the query failed while fetching for the first time. + * `true`, since the query has an error and no data to display. */ isLoadingError: true /** @@ -1617,19 +1617,19 @@ export interface InfiniteQueryObserverLoadingErrorResult< } /** - * An infinite query result in the `error` state when a refetch failed, so the data from before is - * kept. + * An infinite query result in the `error` state that keeps the data from before a fetch or `select` + * failed. */ export interface InfiniteQueryObserverRefetchErrorResult< TData = unknown, TError = DefaultError, > extends InfiniteQueryObserverBaseResult { /** - * The data from before the failed refetch, which is kept. + * The data from before the fetch or `select` failed, which is kept. */ data: TData /** - * The error the refetch failed with. + * The error the fetch or `select` failed with. */ error: TError /** @@ -1649,7 +1649,7 @@ export interface InfiniteQueryObserverRefetchErrorResult< */ isLoadingError: false /** - * `true`, since the query failed while refetching. + * `true`, since the query has an error and still has data to display. */ isRefetchError: true /** From ee7ae71873e0180c6e09944f21ee194db427ae10 Mon Sep 17 00:00:00 2001 From: Wonsuk Choi Date: Sat, 14 Nov 2026 22:06:06 +0900 Subject: [PATCH 3/5] docs(query-core/types): note that 'isRefetchError' is 'false' after a failed page fetch in infinite queries --- .../reference/interfaces/InfiniteQueryObserverBaseResult.md | 2 +- .../interfaces/InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../angular/reference/interfaces/QueryObserverBaseResult.md | 2 +- .../reference/interfaces/InfiniteQueryObserverBaseResult.md | 2 +- .../interfaces/InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../lit/reference/interfaces/QueryObserverBaseResult.md | 2 +- docs/framework/preact/reference/functions/useInfiniteQuery.md | 2 +- docs/framework/preact/reference/functions/useQuery.md | 2 +- .../reference/interfaces/InfiniteQueryObserverBaseResult.md | 2 +- .../interfaces/InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../preact/reference/interfaces/QueryObserverBaseResult.md | 2 +- docs/framework/react/reference/functions/useInfiniteQuery.md | 2 +- docs/framework/react/reference/functions/useQuery.md | 2 +- .../reference/interfaces/InfiniteQueryObserverBaseResult.md | 2 +- .../interfaces/InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../react/reference/interfaces/QueryObserverBaseResult.md | 2 +- docs/framework/solid/reference/functions/useInfiniteQuery.md | 2 +- docs/framework/solid/reference/functions/useQuery.md | 2 +- .../reference/interfaces/InfiniteQueryObserverBaseResult.md | 2 +- .../interfaces/InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../solid/reference/interfaces/QueryObserverBaseResult.md | 2 +- .../svelte/reference/functions/createInfiniteQuery.md | 2 +- docs/framework/svelte/reference/functions/createQuery.md | 2 +- .../reference/interfaces/InfiniteQueryObserverBaseResult.md | 2 +- .../interfaces/InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../svelte/reference/interfaces/QueryObserverBaseResult.md | 2 +- .../reference/interfaces/InfiniteQueryObserverBaseResult.md | 2 +- .../interfaces/InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../vue/reference/interfaces/QueryObserverBaseResult.md | 2 +- packages/query-core/src/types.ts | 4 ++-- 30 files changed, 31 insertions(+), 31 deletions(-) diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md index f069ebc76cc..5ba7748f591 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -65,7 +65,7 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 4e78c914f1c..6f9083a71c3 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -55,7 +55,7 @@ failed. | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md index d6c55666575..db547177803 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md @@ -53,7 +53,7 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md index f069ebc76cc..5ba7748f591 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -65,7 +65,7 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 4e78c914f1c..6f9083a71c3 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -55,7 +55,7 @@ failed. | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md index d6c55666575..db547177803 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md @@ -53,7 +53,7 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/preact/reference/functions/useInfiniteQuery.md b/docs/framework/preact/reference/functions/useInfiniteQuery.md index df7e804f254..79e0941bfdb 100644 --- a/docs/framework/preact/reference/functions/useInfiniteQuery.md +++ b/docs/framework/preact/reference/functions/useInfiniteQuery.md @@ -568,7 +568,7 @@ The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchP | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/preact/reference/functions/useQuery.md b/docs/framework/preact/reference/functions/useQuery.md index 9f2ef899d0e..ebc79d28640 100644 --- a/docs/framework/preact/reference/functions/useQuery.md +++ b/docs/framework/preact/reference/functions/useQuery.md @@ -503,7 +503,7 @@ convenience. | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md index f069ebc76cc..5ba7748f591 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -65,7 +65,7 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 4e78c914f1c..6f9083a71c3 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -55,7 +55,7 @@ failed. | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md index d6c55666575..db547177803 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md @@ -53,7 +53,7 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/react/reference/functions/useInfiniteQuery.md b/docs/framework/react/reference/functions/useInfiniteQuery.md index 070dc51e5c6..e74d01a70c3 100644 --- a/docs/framework/react/reference/functions/useInfiniteQuery.md +++ b/docs/framework/react/reference/functions/useInfiniteQuery.md @@ -570,7 +570,7 @@ The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchP | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/react/reference/functions/useQuery.md b/docs/framework/react/reference/functions/useQuery.md index 22ea03e638e..096b6684259 100644 --- a/docs/framework/react/reference/functions/useQuery.md +++ b/docs/framework/react/reference/functions/useQuery.md @@ -505,7 +505,7 @@ convenience. | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md index f069ebc76cc..5ba7748f591 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -65,7 +65,7 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 4e78c914f1c..6f9083a71c3 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -55,7 +55,7 @@ failed. | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md index d6c55666575..db547177803 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md @@ -53,7 +53,7 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/solid/reference/functions/useInfiniteQuery.md b/docs/framework/solid/reference/functions/useInfiniteQuery.md index 0201ecb2a6e..71a65c6f84b 100644 --- a/docs/framework/solid/reference/functions/useInfiniteQuery.md +++ b/docs/framework/solid/reference/functions/useInfiniteQuery.md @@ -344,7 +344,7 @@ The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchP | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/solid/reference/functions/useQuery.md b/docs/framework/solid/reference/functions/useQuery.md index 578614617ea..dfbb49631e9 100644 --- a/docs/framework/solid/reference/functions/useQuery.md +++ b/docs/framework/solid/reference/functions/useQuery.md @@ -380,7 +380,7 @@ booleans for convenience. | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md index f069ebc76cc..5ba7748f591 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -65,7 +65,7 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 4e78c914f1c..6f9083a71c3 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -55,7 +55,7 @@ failed. | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md index d6c55666575..db547177803 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md @@ -53,7 +53,7 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/svelte/reference/functions/createInfiniteQuery.md b/docs/framework/svelte/reference/functions/createInfiniteQuery.md index 5098622d8c4..99cb816d4e3 100644 --- a/docs/framework/svelte/reference/functions/createInfiniteQuery.md +++ b/docs/framework/svelte/reference/functions/createInfiniteQuery.md @@ -394,7 +394,7 @@ to page through the query. | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/svelte/reference/functions/createQuery.md b/docs/framework/svelte/reference/functions/createQuery.md index 551e09e1834..a378532366e 100644 --- a/docs/framework/svelte/reference/functions/createQuery.md +++ b/docs/framework/svelte/reference/functions/createQuery.md @@ -468,7 +468,7 @@ convenience. | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md index f069ebc76cc..5ba7748f591 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -65,7 +65,7 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 4e78c914f1c..6f9083a71c3 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -55,7 +55,7 @@ failed. | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md index d6c55666575..db547177803 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md @@ -53,7 +53,7 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md index f069ebc76cc..5ba7748f591 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -65,7 +65,7 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 4e78c914f1c..6f9083a71c3 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -55,7 +55,7 @@ failed. | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | | `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | -| `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | +| `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md index d6c55666575..db547177803 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md @@ -53,7 +53,7 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 `true` if the query has no data to display and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | -| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display. | +| `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | diff --git a/packages/query-core/src/types.ts b/packages/query-core/src/types.ts index 5527411a55b..4cf1e6a6392 100644 --- a/packages/query-core/src/types.ts +++ b/packages/query-core/src/types.ts @@ -1041,7 +1041,7 @@ export interface QueryObserverBaseResult< */ isPlaceholderData: boolean /** - * Will be `true` if the query has an error and still has data to display. + * Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). */ isRefetchError: boolean /** @@ -1649,7 +1649,7 @@ export interface InfiniteQueryObserverRefetchErrorResult< */ isLoadingError: false /** - * `true`, since the query has an error and still has data to display. + * `true`, since the query has an error, still has data to display, and didn't fail fetching a page. */ isRefetchError: true /** From b017f489d2da231eab17c3846af12cb16ce4deff Mon Sep 17 00:00:00 2001 From: Wonsuk Choi Date: Sat, 14 Nov 2026 22:13:27 +0900 Subject: [PATCH 4/5] docs({query-core,react,preact,vue,solid,svelte,angular}-query): describe 'success' and 'pending' by cached data and 'placeholderData' since 'select' can return 'undefined' --- .../reference/functions/injectQuery.md | 6 +- .../InfiniteQueryObserverBaseResult.md | 6 +- ...InfiniteQueryObserverLoadingErrorResult.md | 4 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 4 +- ...InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../InfiniteQueryObserverSuccessResult.md | 4 +- .../interfaces/QueryObserverBaseResult.md | 6 +- .../QueryObserverLoadingErrorResult.md | 4 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 4 +- .../QueryObserverRefetchErrorResult.md | 2 +- .../interfaces/QueryObserverSuccessResult.md | 4 +- .../InfiniteQueryObserverBaseResult.md | 6 +- ...InfiniteQueryObserverLoadingErrorResult.md | 4 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 4 +- ...InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../InfiniteQueryObserverSuccessResult.md | 4 +- .../interfaces/QueryObserverBaseResult.md | 6 +- .../QueryObserverLoadingErrorResult.md | 4 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 4 +- .../QueryObserverRefetchErrorResult.md | 2 +- .../interfaces/QueryObserverSuccessResult.md | 4 +- .../reference/functions/useInfiniteQuery.md | 6 +- .../preact/reference/functions/useQuery.md | 24 ++++---- .../InfiniteQueryObserverBaseResult.md | 6 +- ...InfiniteQueryObserverLoadingErrorResult.md | 4 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 4 +- ...InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../InfiniteQueryObserverSuccessResult.md | 4 +- .../interfaces/QueryObserverBaseResult.md | 6 +- .../QueryObserverLoadingErrorResult.md | 4 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 4 +- .../QueryObserverRefetchErrorResult.md | 2 +- .../interfaces/QueryObserverSuccessResult.md | 4 +- .../reference/functions/useInfiniteQuery.md | 6 +- .../react/reference/functions/useQuery.md | 24 ++++---- .../InfiniteQueryObserverBaseResult.md | 6 +- ...InfiniteQueryObserverLoadingErrorResult.md | 4 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 4 +- ...InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../InfiniteQueryObserverSuccessResult.md | 4 +- .../interfaces/QueryObserverBaseResult.md | 6 +- .../QueryObserverLoadingErrorResult.md | 4 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 4 +- .../QueryObserverRefetchErrorResult.md | 2 +- .../interfaces/QueryObserverSuccessResult.md | 4 +- .../reference/functions/useInfiniteQuery.md | 6 +- .../solid/reference/functions/useQuery.md | 18 +++--- .../InfiniteQueryObserverBaseResult.md | 6 +- ...InfiniteQueryObserverLoadingErrorResult.md | 4 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 4 +- ...InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../InfiniteQueryObserverSuccessResult.md | 4 +- .../interfaces/QueryObserverBaseResult.md | 6 +- .../QueryObserverLoadingErrorResult.md | 4 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 4 +- .../QueryObserverRefetchErrorResult.md | 2 +- .../interfaces/QueryObserverSuccessResult.md | 4 +- .../solid/reference/variables/createQuery.md | 6 +- .../functions/createInfiniteQuery.md | 6 +- .../svelte/reference/functions/createQuery.md | 24 ++++---- .../InfiniteQueryObserverBaseResult.md | 6 +- ...InfiniteQueryObserverLoadingErrorResult.md | 4 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 4 +- ...InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../InfiniteQueryObserverSuccessResult.md | 4 +- .../interfaces/QueryObserverBaseResult.md | 6 +- .../QueryObserverLoadingErrorResult.md | 4 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 4 +- .../QueryObserverRefetchErrorResult.md | 2 +- .../interfaces/QueryObserverSuccessResult.md | 4 +- .../vue/reference/functions/useQuery.md | 31 +++++----- .../InfiniteQueryObserverBaseResult.md | 6 +- ...InfiniteQueryObserverLoadingErrorResult.md | 4 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 4 +- ...InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../InfiniteQueryObserverSuccessResult.md | 4 +- .../interfaces/QueryObserverBaseResult.md | 6 +- .../QueryObserverLoadingErrorResult.md | 4 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 4 +- .../QueryObserverRefetchErrorResult.md | 2 +- .../interfaces/QueryObserverSuccessResult.md | 4 +- .../src/inject-query.ts | 6 +- packages/preact-query/src/useQuery.ts | 12 ++-- packages/query-core/src/types.ts | 56 +++++++++---------- packages/react-query/src/useQuery.ts | 12 ++-- packages/solid-query/src/useQuery.ts | 6 +- packages/svelte-query/src/createQuery.ts | 12 ++-- packages/vue-query/src/useQuery.ts | 18 +++--- 116 files changed, 338 insertions(+), 333 deletions(-) diff --git a/docs/framework/angular/reference/functions/injectQuery.md b/docs/framework/angular/reference/functions/injectQuery.md index 044f2091c7c..bff92c8c264 100644 --- a/docs/framework/angular/reference/functions/injectQuery.md +++ b/docs/framework/angular/reference/functions/injectQuery.md @@ -159,9 +159,9 @@ Additional configuration [`CreateQueryResult`](../type-aliases/CreateQueryResult.md)\<`TData`, `TError`\> The query result. `status()` is `'error'` if the query has an error from a fetch that failed -after its retries or if `select` threw, `'success'` if the query has data to display (including -`placeholderData`), and `'pending'` otherwise. `isPending`/`isSuccess`/`isError` are type-guard methods -for convenience. +after its retries or if `select` threw, `'success'` if the query has cached data or `placeholderData` +(even if `select` returns `undefined`), and `'pending'` otherwise. `isPending`/`isSuccess`/`isError` +are type-guard methods for convenience. ### See diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md index 5ba7748f591..e7f00bef35e 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index 03cfb128b8e..eb3f64c0b4c 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -27,7 +27,7 @@ An infinite query result in the `error` state with no data to display, since a f | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since there was no data to display when a fetch or `select` failed. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | | `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `errorUpdateCount` | `number` | The sum of all errors. | - | @@ -52,7 +52,7 @@ An infinite query result in the `error` state with no data to display, since a f | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingResult.md index 08bedcf2cb4..b57dff2a855 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPendingResult.md index e3b464b8caf..5cf4e780700 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index 95bc9de5148..4422ee20e57 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,11 +53,11 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query shows `placeholderData` and has no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 6f9083a71c3..53010451c7f 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,7 +53,7 @@ failed. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 026f0e7aa43..9331ad6dc18 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,11 +52,11 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has cached data and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md index db547177803..2201c3da5a8 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/angular/reference/interfaces/QueryObserverLoadingErrorResult.md index 47c4f501789..6b079402249 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -27,7 +27,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since there was no data to display when a fetch or `select` failed. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | | `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `errorUpdateCount` | `number` | The sum of all errors. | - | @@ -44,7 +44,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/angular/reference/interfaces/QueryObserverLoadingResult.md index a7cb783f7b0..1d9a1e0af52 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/angular/reference/interfaces/QueryObserverPendingResult.md index 62525143cba..3353fc90b03 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/angular/reference/interfaces/QueryObserverPlaceholderResult.md index 4b5e0dd6255..63ee2238e15 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,11 +45,11 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query shows `placeholderData` and has no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/angular/reference/interfaces/QueryObserverRefetchErrorResult.md index 16dfc2f8b9d..d2348c602f5 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state that keeps the data from before a fetch or ` | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/angular/reference/interfaces/QueryObserverSuccessResult.md index f84e964078b..808cccf6dd6 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverSuccessResult.md @@ -44,11 +44,11 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has cached data and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md index 5ba7748f591..e7f00bef35e 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index 03cfb128b8e..eb3f64c0b4c 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -27,7 +27,7 @@ An infinite query result in the `error` state with no data to display, since a f | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since there was no data to display when a fetch or `select` failed. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | | `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `errorUpdateCount` | `number` | The sum of all errors. | - | @@ -52,7 +52,7 @@ An infinite query result in the `error` state with no data to display, since a f | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingResult.md index 08bedcf2cb4..b57dff2a855 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPendingResult.md index e3b464b8caf..5cf4e780700 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index 95bc9de5148..4422ee20e57 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,11 +53,11 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query shows `placeholderData` and has no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 6f9083a71c3..53010451c7f 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,7 +53,7 @@ failed. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 026f0e7aa43..9331ad6dc18 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,11 +52,11 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has cached data and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md index db547177803..2201c3da5a8 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/lit/reference/interfaces/QueryObserverLoadingErrorResult.md index 47c4f501789..6b079402249 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -27,7 +27,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since there was no data to display when a fetch or `select` failed. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | | `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `errorUpdateCount` | `number` | The sum of all errors. | - | @@ -44,7 +44,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/lit/reference/interfaces/QueryObserverLoadingResult.md index a7cb783f7b0..1d9a1e0af52 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/lit/reference/interfaces/QueryObserverPendingResult.md index 62525143cba..3353fc90b03 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/lit/reference/interfaces/QueryObserverPlaceholderResult.md index 4b5e0dd6255..63ee2238e15 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,11 +45,11 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query shows `placeholderData` and has no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/lit/reference/interfaces/QueryObserverRefetchErrorResult.md index 16dfc2f8b9d..d2348c602f5 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state that keeps the data from before a fetch or ` | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/lit/reference/interfaces/QueryObserverSuccessResult.md index f84e964078b..808cccf6dd6 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverSuccessResult.md @@ -44,11 +44,11 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has cached data and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/functions/useInfiniteQuery.md b/docs/framework/preact/reference/functions/useInfiniteQuery.md index 79e0941bfdb..960a12021b1 100644 --- a/docs/framework/preact/reference/functions/useInfiniteQuery.md +++ b/docs/framework/preact/reference/functions/useInfiniteQuery.md @@ -566,11 +566,11 @@ The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchP | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/preact/reference/functions/useQuery.md b/docs/framework/preact/reference/functions/useQuery.md index ebc79d28640..1f6cdd49f56 100644 --- a/docs/framework/preact/reference/functions/useQuery.md +++ b/docs/framework/preact/reference/functions/useQuery.md @@ -155,9 +155,9 @@ be used. [`UseQueryResult`](../type-aliases/UseQueryResult.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has data to display (including -`placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived booleans for -convenience. +after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even +if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived +booleans for convenience. ### See @@ -263,9 +263,9 @@ be used. [`UseQueryResult`](../type-aliases/UseQueryResult.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has data to display (including -`placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived booleans for -convenience. +after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even +if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived +booleans for convenience. ### See @@ -474,9 +474,9 @@ be used. [`UseQueryResult`](../type-aliases/UseQueryResult.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has data to display (including -`placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived booleans for -convenience. +after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even +if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived +booleans for convenience. @@ -501,11 +501,11 @@ convenience. | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md index 5ba7748f591..e7f00bef35e 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index 03cfb128b8e..eb3f64c0b4c 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -27,7 +27,7 @@ An infinite query result in the `error` state with no data to display, since a f | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since there was no data to display when a fetch or `select` failed. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | | `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `errorUpdateCount` | `number` | The sum of all errors. | - | @@ -52,7 +52,7 @@ An infinite query result in the `error` state with no data to display, since a f | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingResult.md index 08bedcf2cb4..b57dff2a855 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPendingResult.md index e3b464b8caf..5cf4e780700 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index 95bc9de5148..4422ee20e57 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,11 +53,11 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query shows `placeholderData` and has no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 6f9083a71c3..53010451c7f 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,7 +53,7 @@ failed. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 026f0e7aa43..9331ad6dc18 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,11 +52,11 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has cached data and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md index db547177803..2201c3da5a8 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/preact/reference/interfaces/QueryObserverLoadingErrorResult.md index 47c4f501789..6b079402249 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -27,7 +27,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since there was no data to display when a fetch or `select` failed. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | | `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `errorUpdateCount` | `number` | The sum of all errors. | - | @@ -44,7 +44,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/preact/reference/interfaces/QueryObserverLoadingResult.md index a7cb783f7b0..1d9a1e0af52 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/preact/reference/interfaces/QueryObserverPendingResult.md index 62525143cba..3353fc90b03 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/preact/reference/interfaces/QueryObserverPlaceholderResult.md index 4b5e0dd6255..63ee2238e15 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,11 +45,11 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query shows `placeholderData` and has no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/preact/reference/interfaces/QueryObserverRefetchErrorResult.md index 16dfc2f8b9d..d2348c602f5 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state that keeps the data from before a fetch or ` | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/preact/reference/interfaces/QueryObserverSuccessResult.md index f84e964078b..808cccf6dd6 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverSuccessResult.md @@ -44,11 +44,11 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has cached data and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/functions/useInfiniteQuery.md b/docs/framework/react/reference/functions/useInfiniteQuery.md index e74d01a70c3..0753c659c36 100644 --- a/docs/framework/react/reference/functions/useInfiniteQuery.md +++ b/docs/framework/react/reference/functions/useInfiniteQuery.md @@ -568,11 +568,11 @@ The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchP | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/react/reference/functions/useQuery.md b/docs/framework/react/reference/functions/useQuery.md index 096b6684259..9af744c4076 100644 --- a/docs/framework/react/reference/functions/useQuery.md +++ b/docs/framework/react/reference/functions/useQuery.md @@ -157,9 +157,9 @@ be used. [`UseQueryResult`](../type-aliases/UseQueryResult.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has data to display (including -`placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived booleans for -convenience. +after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even +if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived +booleans for convenience. ### See @@ -265,9 +265,9 @@ be used. [`UseQueryResult`](../type-aliases/UseQueryResult.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has data to display (including -`placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived booleans for -convenience. +after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even +if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived +booleans for convenience. ### See @@ -476,9 +476,9 @@ be used. [`UseQueryResult`](../type-aliases/UseQueryResult.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has data to display (including -`placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived booleans for -convenience. +after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even +if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived +booleans for convenience. @@ -503,11 +503,11 @@ convenience. | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md index 5ba7748f591..e7f00bef35e 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index 03cfb128b8e..eb3f64c0b4c 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -27,7 +27,7 @@ An infinite query result in the `error` state with no data to display, since a f | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since there was no data to display when a fetch or `select` failed. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | | `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `errorUpdateCount` | `number` | The sum of all errors. | - | @@ -52,7 +52,7 @@ An infinite query result in the `error` state with no data to display, since a f | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingResult.md index 08bedcf2cb4..b57dff2a855 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverPendingResult.md index e3b464b8caf..5cf4e780700 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index 95bc9de5148..4422ee20e57 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,11 +53,11 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query shows `placeholderData` and has no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 6f9083a71c3..53010451c7f 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,7 +53,7 @@ failed. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 026f0e7aa43..9331ad6dc18 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,11 +52,11 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has cached data and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md index db547177803..2201c3da5a8 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/react/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/react/reference/interfaces/QueryObserverLoadingErrorResult.md index 47c4f501789..6b079402249 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -27,7 +27,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since there was no data to display when a fetch or `select` failed. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | | `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `errorUpdateCount` | `number` | The sum of all errors. | - | @@ -44,7 +44,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/react/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/react/reference/interfaces/QueryObserverLoadingResult.md index a7cb783f7b0..1d9a1e0af52 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/react/reference/interfaces/QueryObserverPendingResult.md index 62525143cba..3353fc90b03 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/react/reference/interfaces/QueryObserverPlaceholderResult.md index 4b5e0dd6255..63ee2238e15 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,11 +45,11 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query shows `placeholderData` and has no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/react/reference/interfaces/QueryObserverRefetchErrorResult.md index 16dfc2f8b9d..d2348c602f5 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state that keeps the data from before a fetch or ` | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/react/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/react/reference/interfaces/QueryObserverSuccessResult.md index f84e964078b..808cccf6dd6 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverSuccessResult.md @@ -44,11 +44,11 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has cached data and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/functions/useInfiniteQuery.md b/docs/framework/solid/reference/functions/useInfiniteQuery.md index 71a65c6f84b..1fafd95b109 100644 --- a/docs/framework/solid/reference/functions/useInfiniteQuery.md +++ b/docs/framework/solid/reference/functions/useInfiniteQuery.md @@ -342,11 +342,11 @@ The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchP | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/solid/reference/functions/useQuery.md b/docs/framework/solid/reference/functions/useQuery.md index dfbb49631e9..62cdf762e05 100644 --- a/docs/framework/solid/reference/functions/useQuery.md +++ b/docs/framework/solid/reference/functions/useQuery.md @@ -161,9 +161,9 @@ will be used. [`UseQueryResult`](../type-aliases/UseQueryResult.md)\<`TData`, `TError`\> The current query result, as a Solid store. `status` is `error` if the query has an error from -a fetch that failed after its retries or if `select` threw, `success` if the query has data to display -(including `placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived -booleans for convenience. +a fetch that failed after its retries or if `select` threw, `success` if the query has cached data or +`placeholderData` (even if `select` returns `undefined`), and `pending` otherwise. +`isPending`/`isSuccess`/`isError` are derived booleans for convenience. ### See @@ -351,9 +351,9 @@ will be used. [`UseQueryResult`](../type-aliases/UseQueryResult.md)\<`TData`, `TError`\> The current query result, as a Solid store. `status` is `error` if the query has an error from -a fetch that failed after its retries or if `select` threw, `success` if the query has data to display -(including `placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived -booleans for convenience. +a fetch that failed after its retries or if `select` threw, `success` if the query has cached data or +`placeholderData` (even if `select` returns `undefined`), and `pending` otherwise. +`isPending`/`isSuccess`/`isError` are derived booleans for convenience. @@ -378,11 +378,11 @@ booleans for convenience. | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md index 5ba7748f591..e7f00bef35e 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index 03cfb128b8e..eb3f64c0b4c 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -27,7 +27,7 @@ An infinite query result in the `error` state with no data to display, since a f | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since there was no data to display when a fetch or `select` failed. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | | `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `errorUpdateCount` | `number` | The sum of all errors. | - | @@ -52,7 +52,7 @@ An infinite query result in the `error` state with no data to display, since a f | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingResult.md index 08bedcf2cb4..b57dff2a855 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPendingResult.md index e3b464b8caf..5cf4e780700 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index 95bc9de5148..4422ee20e57 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,11 +53,11 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query shows `placeholderData` and has no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 6f9083a71c3..53010451c7f 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,7 +53,7 @@ failed. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 026f0e7aa43..9331ad6dc18 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,11 +52,11 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has cached data and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md index db547177803..2201c3da5a8 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/solid/reference/interfaces/QueryObserverLoadingErrorResult.md index 47c4f501789..6b079402249 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -27,7 +27,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since there was no data to display when a fetch or `select` failed. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | | `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `errorUpdateCount` | `number` | The sum of all errors. | - | @@ -44,7 +44,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/solid/reference/interfaces/QueryObserverLoadingResult.md index a7cb783f7b0..1d9a1e0af52 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/solid/reference/interfaces/QueryObserverPendingResult.md index 62525143cba..3353fc90b03 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/solid/reference/interfaces/QueryObserverPlaceholderResult.md index 4b5e0dd6255..63ee2238e15 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,11 +45,11 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query shows `placeholderData` and has no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/solid/reference/interfaces/QueryObserverRefetchErrorResult.md index 16dfc2f8b9d..d2348c602f5 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state that keeps the data from before a fetch or ` | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/solid/reference/interfaces/QueryObserverSuccessResult.md index f84e964078b..808cccf6dd6 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverSuccessResult.md @@ -44,11 +44,11 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has cached data and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/variables/createQuery.md b/docs/framework/solid/reference/variables/createQuery.md index ad979c4a776..3c7563567fa 100644 --- a/docs/framework/solid/reference/variables/createQuery.md +++ b/docs/framework/solid/reference/variables/createQuery.md @@ -148,9 +148,9 @@ will be used. [`UseQueryResult`](../type-aliases/UseQueryResult.md)\<`TData`, `TError`\> The current query result, as a Solid store. `status` is `error` if the query has an error from -a fetch that failed after its retries or if `select` threw, `success` if the query has data to display -(including `placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived -booleans for convenience. +a fetch that failed after its retries or if `select` threw, `success` if the query has cached data or +`placeholderData` (even if `select` returns `undefined`), and `pending` otherwise. +`isPending`/`isSuccess`/`isError` are derived booleans for convenience. ### See diff --git a/docs/framework/svelte/reference/functions/createInfiniteQuery.md b/docs/framework/svelte/reference/functions/createInfiniteQuery.md index 99cb816d4e3..c675d664abf 100644 --- a/docs/framework/svelte/reference/functions/createInfiniteQuery.md +++ b/docs/framework/svelte/reference/functions/createInfiniteQuery.md @@ -392,11 +392,11 @@ to page through the query. | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/svelte/reference/functions/createQuery.md b/docs/framework/svelte/reference/functions/createQuery.md index a378532366e..ee55a53e413 100644 --- a/docs/framework/svelte/reference/functions/createQuery.md +++ b/docs/framework/svelte/reference/functions/createQuery.md @@ -160,9 +160,9 @@ be used. [`CreateQueryResult`](../type-aliases/CreateQueryResult.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has data to display (including -`placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived booleans for -convenience. +after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even +if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived +booleans for convenience. ### See @@ -270,9 +270,9 @@ be used. [`CreateQueryResult`](../type-aliases/CreateQueryResult.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has data to display (including -`placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived booleans for -convenience. +after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even +if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived +booleans for convenience. ### See @@ -439,9 +439,9 @@ be used. [`CreateQueryResult`](../type-aliases/CreateQueryResult.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has data to display (including -`placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived booleans for -convenience. +after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even +if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived +booleans for convenience. @@ -466,11 +466,11 @@ convenience. | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md index 5ba7748f591..e7f00bef35e 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index 03cfb128b8e..eb3f64c0b4c 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -27,7 +27,7 @@ An infinite query result in the `error` state with no data to display, since a f | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since there was no data to display when a fetch or `select` failed. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | | `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `errorUpdateCount` | `number` | The sum of all errors. | - | @@ -52,7 +52,7 @@ An infinite query result in the `error` state with no data to display, since a f | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingResult.md index 08bedcf2cb4..b57dff2a855 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPendingResult.md index e3b464b8caf..5cf4e780700 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index 95bc9de5148..4422ee20e57 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,11 +53,11 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query shows `placeholderData` and has no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 6f9083a71c3..53010451c7f 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,7 +53,7 @@ failed. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 026f0e7aa43..9331ad6dc18 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,11 +52,11 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has cached data and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md index db547177803..2201c3da5a8 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverLoadingErrorResult.md index 47c4f501789..6b079402249 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -27,7 +27,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since there was no data to display when a fetch or `select` failed. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | | `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `errorUpdateCount` | `number` | The sum of all errors. | - | @@ -44,7 +44,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverLoadingResult.md index a7cb783f7b0..1d9a1e0af52 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverPendingResult.md index 62525143cba..3353fc90b03 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverPlaceholderResult.md index 4b5e0dd6255..63ee2238e15 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,11 +45,11 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query shows `placeholderData` and has no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverRefetchErrorResult.md index 16dfc2f8b9d..d2348c602f5 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state that keeps the data from before a fetch or ` | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverSuccessResult.md index f84e964078b..808cccf6dd6 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverSuccessResult.md @@ -44,11 +44,11 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has cached data and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/functions/useQuery.md b/docs/framework/vue/reference/functions/useQuery.md index 5beba974a25..b8d83104118 100644 --- a/docs/framework/vue/reference/functions/useQuery.md +++ b/docs/framework/vue/reference/functions/useQuery.md @@ -116,7 +116,7 @@ const { data, isError, error } = useQuery({ function useQuery(options: UndefinedInitialQueryOptions, queryClient?: QueryClient): UseQueryReturnType; ``` -Defined in: [packages/vue-query/src/useQuery.ts:240](https://github.com/TanStack/query/blob/main/packages/vue-query/src/useQuery.ts#L240) +Defined in: [packages/vue-query/src/useQuery.ts:241](https://github.com/TanStack/query/blob/main/packages/vue-query/src/useQuery.ts#L241) `enabled` accepts a `ref`, a plain boolean, or a zero-argument getter (`() => ...`): a `ref` or a getter is tracked, while a plain boolean isn't tracked on its own. query-core's `(query) => boolean` callback is @@ -162,10 +162,11 @@ will be used. [`UseQueryReturnType`](../type-aliases/UseQueryReturnType.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has data to display (including -`placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived boolean `ref`s for -convenience. `state` is that result as one readonly reactive object — `state.data`, `state.isPending`, and -the rest are plain values, and `state.status === 'success'` narrows `state.data` to `TData`. +after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even if +`select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived boolean +`ref`s for convenience. `state` is that result as one readonly reactive object — `state.data`, +`state.isPending`, and the rest are plain values, and `state.status === 'success'` narrows `state.data` to +`TData`. ### Examples @@ -314,7 +315,7 @@ const { state } = useQuery({ function useQuery(options: MaybeRefOrGetter>, queryClient?: QueryClient): UseQueryReturnType; ``` -Defined in: [packages/vue-query/src/useQuery.ts:318](https://github.com/TanStack/query/blob/main/packages/vue-query/src/useQuery.ts#L318) +Defined in: [packages/vue-query/src/useQuery.ts:320](https://github.com/TanStack/query/blob/main/packages/vue-query/src/useQuery.ts#L320) Fallback overload for options whose `initialData` presence isn't statically known — for example, a `ref`/reactive object built up conditionally, rather than a plain object literal. Prefer one of the other @@ -366,10 +367,11 @@ will be used. [`UseQueryReturnType`](../type-aliases/UseQueryReturnType.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has data to display (including -`placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived boolean `ref`s for -convenience. `state` is that result as one readonly reactive object — `state.data`, `state.isPending`, and -the rest are plain values, and `state.status === 'success'` narrows `state.data` to `TData`. +after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even if +`select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived boolean +`ref`s for convenience. `state` is that result as one readonly reactive object — `state.data`, +`state.isPending`, and the rest are plain values, and `state.status === 'success'` narrows `state.data` to +`TData`. ### Examples @@ -444,7 +446,8 @@ will be used. [`UseQueryReturnType`](../type-aliases/UseQueryReturnType.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has data to display (including -`placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived boolean `ref`s for -convenience. `state` is that result as one readonly reactive object — `state.data`, `state.isPending`, and -the rest are plain values, and `state.status === 'success'` narrows `state.data` to `TData`. +after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even if +`select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived boolean +`ref`s for convenience. `state` is that result as one readonly reactive object — `state.data`, +`state.isPending`, and the rest are plain values, and `state.status === 'success'` narrows `state.data` to +`TData`. diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md index 5ba7748f591..e7f00bef35e 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index 03cfb128b8e..eb3f64c0b4c 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -27,7 +27,7 @@ An infinite query result in the `error` state with no data to display, since a f | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since there was no data to display when a fetch or `select` failed. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`data`](InfiniteQueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | | `error` | `TError` | The error the fetch or `select` failed with. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`error`](InfiniteQueryObserverBaseResult.md#property-error) | | `errorUpdateCount` | `number` | The sum of all errors. | - | @@ -52,7 +52,7 @@ An infinite query result in the `error` state with no data to display, since a f | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingResult.md index 08bedcf2cb4..b57dff2a855 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPendingResult.md index e3b464b8caf..5cf4e780700 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index 95bc9de5148..4422ee20e57 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,11 +53,11 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query shows `placeholderData` and has no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 6f9083a71c3..53010451c7f 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,7 +53,7 @@ failed. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 026f0e7aa43..9331ad6dc18 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,11 +52,11 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has cached data and no error from a fetch or from `select`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md index db547177803..2201c3da5a8 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 has an error and no data to display. | | `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 `true` if the query has no data to display and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 data to display (including `placeholderData`) and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or `placeholderData` and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has data to display (including `placeholderData`) and no error. - `pending` otherwise, since the query has no data to display and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/vue/reference/interfaces/QueryObserverLoadingErrorResult.md index 47c4f501789..6b079402249 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -27,7 +27,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | Property | Type | Description | Overrides | | ------ | ------ | ------ | ------ | -| `data` | `undefined` | `undefined`, since a fetch or `select` failed before there was data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | +| `data` | `undefined` | `undefined`, since there was no data to display when a fetch or `select` failed. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`data`](QueryObserverBaseResult.md#property-data) | | `dataUpdatedAt` | `number` | The timestamp for when the query most recently returned the `status` as `"success"`. | - | | `error` | `TError` | The error the fetch or `select` failed with. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`error`](QueryObserverBaseResult.md#property-error) | | `errorUpdateCount` | `number` | The sum of all errors. | - | @@ -44,7 +44,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/vue/reference/interfaces/QueryObserverLoadingResult.md index a7cb783f7b0..1d9a1e0af52 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/vue/reference/interfaces/QueryObserverPendingResult.md index 62525143cba..3353fc90b03 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no data to display and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/vue/reference/interfaces/QueryObserverPlaceholderResult.md index 4b5e0dd6255..63ee2238e15 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,11 +45,11 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query shows `placeholderData` and has no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/vue/reference/interfaces/QueryObserverRefetchErrorResult.md index 16dfc2f8b9d..d2348c602f5 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state that keeps the data from before a fetch or ` | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/vue/reference/interfaces/QueryObserverSuccessResult.md index f84e964078b..808cccf6dd6 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverSuccessResult.md @@ -44,11 +44,11 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has data to display or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `true` | `true`, since the query is in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"success"` | `'success'`, since the query has data to display and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"success"` | `'success'`, since the query has cached data and no error from a fetch or from `select`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/packages/angular-query-experimental/src/inject-query.ts b/packages/angular-query-experimental/src/inject-query.ts index ba19463dca6..e36e1d0cd2d 100644 --- a/packages/angular-query-experimental/src/inject-query.ts +++ b/packages/angular-query-experimental/src/inject-query.ts @@ -91,9 +91,9 @@ export function injectQuery< * context, so signals read inside it (in `queryKey`, `enabled`, etc.) drive the query. * @param options - Additional configuration * @returns The query result. `status()` is `'error'` if the query has an error from a fetch that failed - * after its retries or if `select` threw, `'success'` if the query has data to display (including - * `placeholderData`), and `'pending'` otherwise. `isPending`/`isSuccess`/`isError` are type-guard methods - * for convenience. + * after its retries or if `select` threw, `'success'` if the query has cached data or `placeholderData` + * (even if `select` returns `undefined`), and `'pending'` otherwise. `isPending`/`isSuccess`/`isError` + * are type-guard methods for convenience. * @see https://tanstack.com/query/latest/docs/framework/angular/guides/queries * @see {@link queryOptions} to share these options between `injectQuery` and imperative APIs like * `queryClient.fetchQuery`. diff --git a/packages/preact-query/src/useQuery.ts b/packages/preact-query/src/useQuery.ts index 9abc32d441e..df4330be063 100644 --- a/packages/preact-query/src/useQuery.ts +++ b/packages/preact-query/src/useQuery.ts @@ -65,9 +65,9 @@ export function useQuery< * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will * be used. * @returns The current query result. `status` is `error` if the query has an error from a fetch that failed - * after its retries or if `select` threw, `success` if the query has data to display (including - * `placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived booleans for - * convenience. + * after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even + * if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived + * booleans for convenience. * @see {@link queryOptions} to share these options between `useQuery` and imperative APIs like `queryClient.query`. * @example * ```tsx @@ -134,9 +134,9 @@ export function useQuery< * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will * be used. * @returns The current query result. `status` is `error` if the query has an error from a fetch that failed - * after its retries or if `select` threw, `success` if the query has data to display (including - * `placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived booleans for - * convenience. + * after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even + * if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived + * booleans for convenience. * @see {@link queryOptions} to share these options between `useQuery` and imperative APIs like `queryClient.query`. * @example * ```tsx diff --git a/packages/query-core/src/types.ts b/packages/query-core/src/types.ts index 4cf1e6a6392..3f661a203c4 100644 --- a/packages/query-core/src/types.ts +++ b/packages/query-core/src/types.ts @@ -1019,7 +1019,7 @@ export interface QueryObserverBaseResult< */ isLoading: boolean /** - * Will be `true` if the query has no data to display and no error. + * Will be `true` if the query has no cached data, no `placeholderData` and no error. */ isPending: boolean /** @@ -1055,7 +1055,7 @@ export interface QueryObserverBaseResult< isStale: boolean /** * A derived boolean from the `status` variable, provided for convenience. - * - `true` if the query has data to display (including `placeholderData`) and no error. + * - `true` if the query has cached data or `placeholderData` and no error. */ isSuccess: boolean /** @@ -1072,8 +1072,8 @@ export interface QueryObserverBaseResult< * The status of the query. * - Will be: * - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - * - `success` if the query has data to display (including `placeholderData`) and no error. - * - `pending` otherwise, since the query has no data to display and no error. + * - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. + * - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. */ status: QueryStatus /** @@ -1106,7 +1106,7 @@ export interface QueryObserverPendingResult< */ isError: false /** - * `true`, since the query has no data to display and no error. + * `true`, since the query has no cached data, no `placeholderData` and no error. */ isPending: true /** @@ -1126,7 +1126,7 @@ export interface QueryObserverPendingResult< */ isPlaceholderData: false /** - * `'pending'`, since the query has no data to display and no error. + * `'pending'`, since the query has no cached data, no `placeholderData` and no error. */ status: 'pending' } @@ -1152,7 +1152,7 @@ export interface QueryObserverLoadingResult< */ isError: false /** - * `true`, since the query has no data to display and no error. + * `true`, since the query has no cached data, no `placeholderData` and no error. */ isPending: true /** @@ -1176,7 +1176,7 @@ export interface QueryObserverLoadingResult< */ isPlaceholderData: false /** - * `'pending'`, since the query has no data to display and no error. + * `'pending'`, since the query has no cached data, no `placeholderData` and no error. */ status: 'pending' } @@ -1189,7 +1189,7 @@ export interface QueryObserverLoadingErrorResult< TError = DefaultError, > extends QueryObserverBaseResult { /** - * `undefined`, since a fetch or `select` failed before there was data to display. + * `undefined`, since there was no data to display when a fetch or `select` failed. */ data: undefined /** @@ -1201,7 +1201,7 @@ export interface QueryObserverLoadingErrorResult< */ isError: true /** - * `false`, since the query has data to display or an error. + * `false`, since the query has cached data, `placeholderData` or an error. */ isPending: false /** @@ -1250,7 +1250,7 @@ export interface QueryObserverRefetchErrorResult< */ isError: true /** - * `false`, since the query has data to display or an error. + * `false`, since the query has cached data, `placeholderData` or an error. */ isPending: false /** @@ -1299,7 +1299,7 @@ export interface QueryObserverSuccessResult< */ isError: false /** - * `false`, since the query has data to display or an error. + * `false`, since the query has cached data, `placeholderData` or an error. */ isPending: false /** @@ -1323,7 +1323,7 @@ export interface QueryObserverSuccessResult< */ isPlaceholderData: false /** - * `'success'`, since the query has data to display and no error from a fetch or from + * `'success'`, since the query has cached data and no error from a fetch or from * `select`. */ status: 'success' @@ -1350,7 +1350,7 @@ export interface QueryObserverPlaceholderResult< */ error: null /** - * `false`, since the query has data to display or an error. + * `false`, since the query has cached data, `placeholderData` or an error. */ isPending: false /** @@ -1374,8 +1374,8 @@ export interface QueryObserverPlaceholderResult< */ isPlaceholderData: true /** - * `'success'`, since the query has data to display and no error from a fetch or from - * `select`. + * `'success'`, since the query shows `placeholderData` and has no error from a fetch or + * from `select`. */ status: 'success' } @@ -1468,7 +1468,7 @@ export interface InfiniteQueryObserverPendingResult< */ isError: false /** - * `true`, since the query has no data to display and no error. + * `true`, since the query has no cached data, no `placeholderData` and no error. */ isPending: true /** @@ -1496,7 +1496,7 @@ export interface InfiniteQueryObserverPendingResult< */ isPlaceholderData: false /** - * `'pending'`, since the query has no data to display and no error. + * `'pending'`, since the query has no cached data, no `placeholderData` and no error. */ status: 'pending' } @@ -1522,7 +1522,7 @@ export interface InfiniteQueryObserverLoadingResult< */ isError: false /** - * `true`, since the query has no data to display and no error. + * `true`, since the query has no cached data, no `placeholderData` and no error. */ isPending: true /** @@ -1554,7 +1554,7 @@ export interface InfiniteQueryObserverLoadingResult< */ isPlaceholderData: false /** - * `'pending'`, since the query has no data to display and no error. + * `'pending'`, since the query has no cached data, no `placeholderData` and no error. */ status: 'pending' } @@ -1567,7 +1567,7 @@ export interface InfiniteQueryObserverLoadingErrorResult< TError = DefaultError, > extends InfiniteQueryObserverBaseResult { /** - * `undefined`, since a fetch or `select` failed before there was data to display. + * `undefined`, since there was no data to display when a fetch or `select` failed. */ data: undefined /** @@ -1579,7 +1579,7 @@ export interface InfiniteQueryObserverLoadingErrorResult< */ isError: true /** - * `false`, since the query has data to display or an error. + * `false`, since the query has cached data, `placeholderData` or an error. */ isPending: false /** @@ -1637,7 +1637,7 @@ export interface InfiniteQueryObserverRefetchErrorResult< */ isError: true /** - * `false`, since the query has data to display or an error. + * `false`, since the query has cached data, `placeholderData` or an error. */ isPending: false /** @@ -1686,7 +1686,7 @@ export interface InfiniteQueryObserverSuccessResult< */ isError: false /** - * `false`, since the query has data to display or an error. + * `false`, since the query has cached data, `placeholderData` or an error. */ isPending: false /** @@ -1718,7 +1718,7 @@ export interface InfiniteQueryObserverSuccessResult< */ isPlaceholderData: false /** - * `'success'`, since the query has data to display and no error from a fetch or from + * `'success'`, since the query has cached data and no error from a fetch or from * `select`. */ status: 'success' @@ -1745,7 +1745,7 @@ export interface InfiniteQueryObserverPlaceholderResult< */ error: null /** - * `false`, since the query has data to display or an error. + * `false`, since the query has cached data, `placeholderData` or an error. */ isPending: false /** @@ -1777,8 +1777,8 @@ export interface InfiniteQueryObserverPlaceholderResult< */ isFetchPreviousPageError: false /** - * `'success'`, since the query has data to display and no error from a fetch or from - * `select`. + * `'success'`, since the query shows `placeholderData` and has no error from a fetch or + * from `select`. */ status: 'success' } diff --git a/packages/react-query/src/useQuery.ts b/packages/react-query/src/useQuery.ts index b7af6dce603..422b2ec07b6 100644 --- a/packages/react-query/src/useQuery.ts +++ b/packages/react-query/src/useQuery.ts @@ -65,9 +65,9 @@ export function useQuery< * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will * be used. * @returns The current query result. `status` is `error` if the query has an error from a fetch that failed - * after its retries or if `select` threw, `success` if the query has data to display (including - * `placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived booleans for - * convenience. + * after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even + * if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived + * booleans for convenience. * @see {@link queryOptions} to share these options between `useQuery` and imperative APIs like `queryClient.query`. * @example * ```tsx @@ -134,9 +134,9 @@ export function useQuery< * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will * be used. * @returns The current query result. `status` is `error` if the query has an error from a fetch that failed - * after its retries or if `select` threw, `success` if the query has data to display (including - * `placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived booleans for - * convenience. + * after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even + * if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived + * booleans for convenience. * @see {@link queryOptions} to share these options between `useQuery` and imperative APIs like `queryClient.query`. * @example * ```tsx diff --git a/packages/solid-query/src/useQuery.ts b/packages/solid-query/src/useQuery.ts index f66ea2a8691..5c3c513f742 100644 --- a/packages/solid-query/src/useQuery.ts +++ b/packages/solid-query/src/useQuery.ts @@ -73,9 +73,9 @@ export function useQuery< * @param queryClient - An accessor for a custom `QueryClient`. Otherwise, the one from the nearest context * will be used. * @returns The current query result, as a Solid store. `status` is `error` if the query has an error from - * a fetch that failed after its retries or if `select` threw, `success` if the query has data to display - * (including `placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived - * booleans for convenience. + * a fetch that failed after its retries or if `select` threw, `success` if the query has cached data or + * `placeholderData` (even if `select` returns `undefined`), and `pending` otherwise. + * `isPending`/`isSuccess`/`isError` are derived booleans for convenience. * @see {@link queryOptions} to share these options between `useQuery` and imperative APIs like `queryClient.query`. * @example * ```tsx diff --git a/packages/svelte-query/src/createQuery.ts b/packages/svelte-query/src/createQuery.ts index 8df41fb5d7e..e64657d9a65 100644 --- a/packages/svelte-query/src/createQuery.ts +++ b/packages/svelte-query/src/createQuery.ts @@ -72,9 +72,9 @@ export function createQuery< * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will * be used. * @returns The current query result. `status` is `error` if the query has an error from a fetch that failed - * after its retries or if `select` threw, `success` if the query has data to display (including - * `placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived booleans for - * convenience. + * after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even + * if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived + * booleans for convenience. * @see {@link queryOptions} to share these options between `createQuery` and imperative APIs like `queryClient.query`. * @example * ```svelte @@ -145,9 +145,9 @@ export function createQuery< * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will * be used. * @returns The current query result. `status` is `error` if the query has an error from a fetch that failed - * after its retries or if `select` threw, `success` if the query has data to display (including - * `placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived booleans for - * convenience. + * after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even + * if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived + * booleans for convenience. * @see {@link queryOptions} to share these options between `createQuery` and imperative APIs like `queryClient.query`. * @example * `select` derives whatever `data` a component needs from the cached value, without changing what's diff --git a/packages/vue-query/src/useQuery.ts b/packages/vue-query/src/useQuery.ts index 20dfba5be4c..976422ee045 100644 --- a/packages/vue-query/src/useQuery.ts +++ b/packages/vue-query/src/useQuery.ts @@ -95,10 +95,11 @@ export function useQuery< * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one provided by `VueQueryPlugin` * will be used. * @returns The current query result. `status` is `error` if the query has an error from a fetch that failed - * after its retries or if `select` threw, `success` if the query has data to display (including - * `placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived boolean `ref`s for - * convenience. `state` is that result as one readonly reactive object — `state.data`, `state.isPending`, and - * the rest are plain values, and `state.status === 'success'` narrows `state.data` to `TData`. + * after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even if + * `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived boolean + * `ref`s for convenience. `state` is that result as one readonly reactive object — `state.data`, + * `state.isPending`, and the rest are plain values, and `state.status === 'success'` narrows `state.data` to + * `TData`. * @example * A query key built from a reactive `ref` — the query refetches whenever `postId` changes: * ```vue @@ -263,10 +264,11 @@ export function useQuery< * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one provided by `VueQueryPlugin` * will be used. * @returns The current query result. `status` is `error` if the query has an error from a fetch that failed - * after its retries or if `select` threw, `success` if the query has data to display (including - * `placeholderData`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived boolean `ref`s for - * convenience. `state` is that result as one readonly reactive object — `state.data`, `state.isPending`, and - * the rest are plain values, and `state.status === 'success'` narrows `state.data` to `TData`. + * after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even if + * `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived boolean + * `ref`s for convenience. `state` is that result as one readonly reactive object — `state.data`, + * `state.isPending`, and the rest are plain values, and `state.status === 'success'` narrows `state.data` to + * `TData`. * @example * Passing a whole-options getter so `staleTime` reacts to a setting stored elsewhere, not just `queryKey`: * ```vue From a73d96bfd4c52cdf21cbaa3f50180386409c2377 Mon Sep 17 00:00:00 2001 From: Wonsuk Choi Date: Sat, 14 Nov 2026 22:25:41 +0900 Subject: [PATCH 5/5] docs({query-core,react,preact,vue,solid,svelte,angular}-query): describe 'success' by cached data or data from 'placeholderData', and limit the 'select' returning 'undefined' case to cached data --- .../reference/functions/injectQuery.md | 6 +-- .../InfiniteQueryObserverBaseResult.md | 6 +-- ...InfiniteQueryObserverLoadingErrorResult.md | 2 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 2 +- ...InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../InfiniteQueryObserverSuccessResult.md | 2 +- .../interfaces/QueryObserverBaseResult.md | 6 +-- .../QueryObserverLoadingErrorResult.md | 2 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 2 +- .../QueryObserverRefetchErrorResult.md | 2 +- .../interfaces/QueryObserverSuccessResult.md | 2 +- .../InfiniteQueryObserverBaseResult.md | 6 +-- ...InfiniteQueryObserverLoadingErrorResult.md | 2 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 2 +- ...InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../InfiniteQueryObserverSuccessResult.md | 2 +- .../interfaces/QueryObserverBaseResult.md | 6 +-- .../QueryObserverLoadingErrorResult.md | 2 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 2 +- .../QueryObserverRefetchErrorResult.md | 2 +- .../interfaces/QueryObserverSuccessResult.md | 2 +- .../reference/functions/useInfiniteQuery.md | 6 +-- .../preact/reference/functions/useQuery.md | 24 +++++------ .../InfiniteQueryObserverBaseResult.md | 6 +-- ...InfiniteQueryObserverLoadingErrorResult.md | 2 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 2 +- ...InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../InfiniteQueryObserverSuccessResult.md | 2 +- .../interfaces/QueryObserverBaseResult.md | 6 +-- .../QueryObserverLoadingErrorResult.md | 2 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 2 +- .../QueryObserverRefetchErrorResult.md | 2 +- .../interfaces/QueryObserverSuccessResult.md | 2 +- .../reference/functions/useInfiniteQuery.md | 6 +-- .../react/reference/functions/useQuery.md | 24 +++++------ .../InfiniteQueryObserverBaseResult.md | 6 +-- ...InfiniteQueryObserverLoadingErrorResult.md | 2 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 2 +- ...InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../InfiniteQueryObserverSuccessResult.md | 2 +- .../interfaces/QueryObserverBaseResult.md | 6 +-- .../QueryObserverLoadingErrorResult.md | 2 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 2 +- .../QueryObserverRefetchErrorResult.md | 2 +- .../interfaces/QueryObserverSuccessResult.md | 2 +- .../reference/functions/useInfiniteQuery.md | 6 +-- .../solid/reference/functions/useQuery.md | 14 +++---- .../InfiniteQueryObserverBaseResult.md | 6 +-- ...InfiniteQueryObserverLoadingErrorResult.md | 2 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 2 +- ...InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../InfiniteQueryObserverSuccessResult.md | 2 +- .../interfaces/QueryObserverBaseResult.md | 6 +-- .../QueryObserverLoadingErrorResult.md | 2 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 2 +- .../QueryObserverRefetchErrorResult.md | 2 +- .../interfaces/QueryObserverSuccessResult.md | 2 +- .../solid/reference/variables/createQuery.md | 4 +- .../functions/createInfiniteQuery.md | 6 +-- .../svelte/reference/functions/createQuery.md | 24 +++++------ .../InfiniteQueryObserverBaseResult.md | 6 +-- ...InfiniteQueryObserverLoadingErrorResult.md | 2 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 2 +- ...InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../InfiniteQueryObserverSuccessResult.md | 2 +- .../interfaces/QueryObserverBaseResult.md | 6 +-- .../QueryObserverLoadingErrorResult.md | 2 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 2 +- .../QueryObserverRefetchErrorResult.md | 2 +- .../interfaces/QueryObserverSuccessResult.md | 2 +- .../vue/reference/functions/useQuery.md | 30 +++++++------- .../InfiniteQueryObserverBaseResult.md | 6 +-- ...InfiniteQueryObserverLoadingErrorResult.md | 2 +- .../InfiniteQueryObserverLoadingResult.md | 4 +- .../InfiniteQueryObserverPendingResult.md | 4 +- .../InfiniteQueryObserverPlaceholderResult.md | 2 +- ...InfiniteQueryObserverRefetchErrorResult.md | 2 +- .../InfiniteQueryObserverSuccessResult.md | 2 +- .../interfaces/QueryObserverBaseResult.md | 6 +-- .../QueryObserverLoadingErrorResult.md | 2 +- .../interfaces/QueryObserverLoadingResult.md | 4 +- .../interfaces/QueryObserverPendingResult.md | 4 +- .../QueryObserverPlaceholderResult.md | 2 +- .../QueryObserverRefetchErrorResult.md | 2 +- .../interfaces/QueryObserverSuccessResult.md | 2 +- .../src/inject-query.ts | 6 +-- packages/preact-query/src/useQuery.ts | 12 +++--- packages/query-core/src/types.ts | 40 +++++++++---------- packages/react-query/src/useQuery.ts | 12 +++--- packages/solid-query/src/useQuery.ts | 4 +- packages/svelte-query/src/createQuery.ts | 12 +++--- packages/vue-query/src/useQuery.ts | 20 +++++----- 116 files changed, 282 insertions(+), 282 deletions(-) diff --git a/docs/framework/angular/reference/functions/injectQuery.md b/docs/framework/angular/reference/functions/injectQuery.md index bff92c8c264..971f41edfe9 100644 --- a/docs/framework/angular/reference/functions/injectQuery.md +++ b/docs/framework/angular/reference/functions/injectQuery.md @@ -159,9 +159,9 @@ Additional configuration [`CreateQueryResult`](../type-aliases/CreateQueryResult.md)\<`TData`, `TError`\> The query result. `status()` is `'error'` if the query has an error from a fetch that failed -after its retries or if `select` threw, `'success'` if the query has cached data or `placeholderData` -(even if `select` returns `undefined`), and `'pending'` otherwise. `isPending`/`isSuccess`/`isError` -are type-guard methods for convenience. +after its retries or if `select` threw, `'success'` if the query has cached data (even if `select` +returns `undefined`) or data from `placeholderData`, and `'pending'` otherwise. +`isPending`/`isSuccess`/`isError` are type-guard methods for convenience. ### See diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md index e7f00bef35e..f48ef8c471c 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index eb3f64c0b4c..b5ce3f86221 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -52,7 +52,7 @@ An infinite query result in the `error` state with no data to display, since a f | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingResult.md index b57dff2a855..dd6a84dfc28 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPendingResult.md index 5cf4e780700..9366e704022 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index 4422ee20e57..b7463c3f5a3 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,7 +53,7 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 53010451c7f..14a67291f0a 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,7 +53,7 @@ failed. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 9331ad6dc18..518e0183cd7 100644 --- a/docs/framework/angular/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/angular/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,7 +52,7 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md index 2201c3da5a8..2305064067a 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverBaseResult.md @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/angular/reference/interfaces/QueryObserverLoadingErrorResult.md index 6b079402249..04e30e2964e 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/angular/reference/interfaces/QueryObserverLoadingResult.md index 1d9a1e0af52..2af4c1ac94f 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/angular/reference/interfaces/QueryObserverPendingResult.md index 3353fc90b03..7bb6710c3e8 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/angular/reference/interfaces/QueryObserverPlaceholderResult.md index 63ee2238e15..684353611a9 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,7 +45,7 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/angular/reference/interfaces/QueryObserverRefetchErrorResult.md index d2348c602f5..f369206d490 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state that keeps the data from before a fetch or ` | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/angular/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/angular/reference/interfaces/QueryObserverSuccessResult.md index 808cccf6dd6..1d0d7cc4b9c 100644 --- a/docs/framework/angular/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/angular/reference/interfaces/QueryObserverSuccessResult.md @@ -44,7 +44,7 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md index e7f00bef35e..f48ef8c471c 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index eb3f64c0b4c..b5ce3f86221 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -52,7 +52,7 @@ An infinite query result in the `error` state with no data to display, since a f | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingResult.md index b57dff2a855..dd6a84dfc28 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPendingResult.md index 5cf4e780700..9366e704022 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index 4422ee20e57..b7463c3f5a3 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,7 +53,7 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 53010451c7f..14a67291f0a 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,7 +53,7 @@ failed. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 9331ad6dc18..518e0183cd7 100644 --- a/docs/framework/lit/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/lit/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,7 +52,7 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md index 2201c3da5a8..2305064067a 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverBaseResult.md @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/lit/reference/interfaces/QueryObserverLoadingErrorResult.md index 6b079402249..04e30e2964e 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/lit/reference/interfaces/QueryObserverLoadingResult.md index 1d9a1e0af52..2af4c1ac94f 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/lit/reference/interfaces/QueryObserverPendingResult.md index 3353fc90b03..7bb6710c3e8 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/lit/reference/interfaces/QueryObserverPlaceholderResult.md index 63ee2238e15..684353611a9 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,7 +45,7 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/lit/reference/interfaces/QueryObserverRefetchErrorResult.md index d2348c602f5..f369206d490 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state that keeps the data from before a fetch or ` | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/lit/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/lit/reference/interfaces/QueryObserverSuccessResult.md index 808cccf6dd6..1d0d7cc4b9c 100644 --- a/docs/framework/lit/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/lit/reference/interfaces/QueryObserverSuccessResult.md @@ -44,7 +44,7 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/preact/reference/functions/useInfiniteQuery.md b/docs/framework/preact/reference/functions/useInfiniteQuery.md index 960a12021b1..fce84955e5b 100644 --- a/docs/framework/preact/reference/functions/useInfiniteQuery.md +++ b/docs/framework/preact/reference/functions/useInfiniteQuery.md @@ -566,11 +566,11 @@ The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchP | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/preact/reference/functions/useQuery.md b/docs/framework/preact/reference/functions/useQuery.md index 1f6cdd49f56..ebc5fdbb7d3 100644 --- a/docs/framework/preact/reference/functions/useQuery.md +++ b/docs/framework/preact/reference/functions/useQuery.md @@ -155,9 +155,9 @@ be used. [`UseQueryResult`](../type-aliases/UseQueryResult.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even -if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived -booleans for convenience. +after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns +`undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` +are derived booleans for convenience. ### See @@ -263,9 +263,9 @@ be used. [`UseQueryResult`](../type-aliases/UseQueryResult.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even -if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived -booleans for convenience. +after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns +`undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` +are derived booleans for convenience. ### See @@ -474,9 +474,9 @@ be used. [`UseQueryResult`](../type-aliases/UseQueryResult.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even -if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived -booleans for convenience. +after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns +`undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` +are derived booleans for convenience. @@ -501,11 +501,11 @@ booleans for convenience. | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md index e7f00bef35e..f48ef8c471c 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index eb3f64c0b4c..b5ce3f86221 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -52,7 +52,7 @@ An infinite query result in the `error` state with no data to display, since a f | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingResult.md index b57dff2a855..dd6a84dfc28 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPendingResult.md index 5cf4e780700..9366e704022 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index 4422ee20e57..b7463c3f5a3 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,7 +53,7 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 53010451c7f..14a67291f0a 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,7 +53,7 @@ failed. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 9331ad6dc18..518e0183cd7 100644 --- a/docs/framework/preact/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/preact/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,7 +52,7 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md index 2201c3da5a8..2305064067a 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverBaseResult.md @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/preact/reference/interfaces/QueryObserverLoadingErrorResult.md index 6b079402249..04e30e2964e 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/preact/reference/interfaces/QueryObserverLoadingResult.md index 1d9a1e0af52..2af4c1ac94f 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/preact/reference/interfaces/QueryObserverPendingResult.md index 3353fc90b03..7bb6710c3e8 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/preact/reference/interfaces/QueryObserverPlaceholderResult.md index 63ee2238e15..684353611a9 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,7 +45,7 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/preact/reference/interfaces/QueryObserverRefetchErrorResult.md index d2348c602f5..f369206d490 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state that keeps the data from before a fetch or ` | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/preact/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/preact/reference/interfaces/QueryObserverSuccessResult.md index 808cccf6dd6..1d0d7cc4b9c 100644 --- a/docs/framework/preact/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/preact/reference/interfaces/QueryObserverSuccessResult.md @@ -44,7 +44,7 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/react/reference/functions/useInfiniteQuery.md b/docs/framework/react/reference/functions/useInfiniteQuery.md index 0753c659c36..ec22f989d28 100644 --- a/docs/framework/react/reference/functions/useInfiniteQuery.md +++ b/docs/framework/react/reference/functions/useInfiniteQuery.md @@ -568,11 +568,11 @@ The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchP | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/react/reference/functions/useQuery.md b/docs/framework/react/reference/functions/useQuery.md index 9af744c4076..25fca102382 100644 --- a/docs/framework/react/reference/functions/useQuery.md +++ b/docs/framework/react/reference/functions/useQuery.md @@ -157,9 +157,9 @@ be used. [`UseQueryResult`](../type-aliases/UseQueryResult.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even -if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived -booleans for convenience. +after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns +`undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` +are derived booleans for convenience. ### See @@ -265,9 +265,9 @@ be used. [`UseQueryResult`](../type-aliases/UseQueryResult.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even -if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived -booleans for convenience. +after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns +`undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` +are derived booleans for convenience. ### See @@ -476,9 +476,9 @@ be used. [`UseQueryResult`](../type-aliases/UseQueryResult.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even -if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived -booleans for convenience. +after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns +`undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` +are derived booleans for convenience. @@ -503,11 +503,11 @@ booleans for convenience. | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md index e7f00bef35e..f48ef8c471c 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index eb3f64c0b4c..b5ce3f86221 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -52,7 +52,7 @@ An infinite query result in the `error` state with no data to display, since a f | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingResult.md index b57dff2a855..dd6a84dfc28 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverPendingResult.md index 5cf4e780700..9366e704022 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index 4422ee20e57..b7463c3f5a3 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,7 +53,7 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 53010451c7f..14a67291f0a 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,7 +53,7 @@ failed. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/react/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/react/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 9331ad6dc18..518e0183cd7 100644 --- a/docs/framework/react/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/react/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,7 +52,7 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md index 2201c3da5a8..2305064067a 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverBaseResult.md @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/react/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/react/reference/interfaces/QueryObserverLoadingErrorResult.md index 6b079402249..04e30e2964e 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/react/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/react/reference/interfaces/QueryObserverLoadingResult.md index 1d9a1e0af52..2af4c1ac94f 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/react/reference/interfaces/QueryObserverPendingResult.md index 3353fc90b03..7bb6710c3e8 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/react/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/react/reference/interfaces/QueryObserverPlaceholderResult.md index 63ee2238e15..684353611a9 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,7 +45,7 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/react/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/react/reference/interfaces/QueryObserverRefetchErrorResult.md index d2348c602f5..f369206d490 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state that keeps the data from before a fetch or ` | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/react/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/react/reference/interfaces/QueryObserverSuccessResult.md index 808cccf6dd6..1d0d7cc4b9c 100644 --- a/docs/framework/react/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/react/reference/interfaces/QueryObserverSuccessResult.md @@ -44,7 +44,7 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/solid/reference/functions/useInfiniteQuery.md b/docs/framework/solid/reference/functions/useInfiniteQuery.md index 1fafd95b109..67d4f2dc480 100644 --- a/docs/framework/solid/reference/functions/useInfiniteQuery.md +++ b/docs/framework/solid/reference/functions/useInfiniteQuery.md @@ -342,11 +342,11 @@ The same properties as `useQuery`, with the addition of `fetchNextPage`, `fetchP | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/solid/reference/functions/useQuery.md b/docs/framework/solid/reference/functions/useQuery.md index 62cdf762e05..e4f6d80a999 100644 --- a/docs/framework/solid/reference/functions/useQuery.md +++ b/docs/framework/solid/reference/functions/useQuery.md @@ -161,8 +161,8 @@ will be used. [`UseQueryResult`](../type-aliases/UseQueryResult.md)\<`TData`, `TError`\> The current query result, as a Solid store. `status` is `error` if the query has an error from -a fetch that failed after its retries or if `select` threw, `success` if the query has cached data or -`placeholderData` (even if `select` returns `undefined`), and `pending` otherwise. +a fetch that failed after its retries or if `select` threw, `success` if the query has cached data +(even if `select` returns `undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived booleans for convenience. ### See @@ -351,8 +351,8 @@ will be used. [`UseQueryResult`](../type-aliases/UseQueryResult.md)\<`TData`, `TError`\> The current query result, as a Solid store. `status` is `error` if the query has an error from -a fetch that failed after its retries or if `select` threw, `success` if the query has cached data or -`placeholderData` (even if `select` returns `undefined`), and `pending` otherwise. +a fetch that failed after its retries or if `select` threw, `success` if the query has cached data +(even if `select` returns `undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived booleans for convenience. @@ -378,11 +378,11 @@ a fetch that failed after its retries or if `select` threw, `success` if the que | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md index e7f00bef35e..f48ef8c471c 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index eb3f64c0b4c..b5ce3f86221 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -52,7 +52,7 @@ An infinite query result in the `error` state with no data to display, since a f | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingResult.md index b57dff2a855..dd6a84dfc28 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPendingResult.md index 5cf4e780700..9366e704022 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index 4422ee20e57..b7463c3f5a3 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,7 +53,7 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 53010451c7f..14a67291f0a 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,7 +53,7 @@ failed. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 9331ad6dc18..518e0183cd7 100644 --- a/docs/framework/solid/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/solid/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,7 +52,7 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md index 2201c3da5a8..2305064067a 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverBaseResult.md @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/solid/reference/interfaces/QueryObserverLoadingErrorResult.md index 6b079402249..04e30e2964e 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/solid/reference/interfaces/QueryObserverLoadingResult.md index 1d9a1e0af52..2af4c1ac94f 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/solid/reference/interfaces/QueryObserverPendingResult.md index 3353fc90b03..7bb6710c3e8 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/solid/reference/interfaces/QueryObserverPlaceholderResult.md index 63ee2238e15..684353611a9 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,7 +45,7 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/solid/reference/interfaces/QueryObserverRefetchErrorResult.md index d2348c602f5..f369206d490 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state that keeps the data from before a fetch or ` | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/solid/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/solid/reference/interfaces/QueryObserverSuccessResult.md index 808cccf6dd6..1d0d7cc4b9c 100644 --- a/docs/framework/solid/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/solid/reference/interfaces/QueryObserverSuccessResult.md @@ -44,7 +44,7 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/solid/reference/variables/createQuery.md b/docs/framework/solid/reference/variables/createQuery.md index 3c7563567fa..8a94cfc7d32 100644 --- a/docs/framework/solid/reference/variables/createQuery.md +++ b/docs/framework/solid/reference/variables/createQuery.md @@ -148,8 +148,8 @@ will be used. [`UseQueryResult`](../type-aliases/UseQueryResult.md)\<`TData`, `TError`\> The current query result, as a Solid store. `status` is `error` if the query has an error from -a fetch that failed after its retries or if `select` threw, `success` if the query has cached data or -`placeholderData` (even if `select` returns `undefined`), and `pending` otherwise. +a fetch that failed after its retries or if `select` threw, `success` if the query has cached data +(even if `select` returns `undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived booleans for convenience. ### See diff --git a/docs/framework/svelte/reference/functions/createInfiniteQuery.md b/docs/framework/svelte/reference/functions/createInfiniteQuery.md index c675d664abf..f3b88b4c190 100644 --- a/docs/framework/svelte/reference/functions/createInfiniteQuery.md +++ b/docs/framework/svelte/reference/functions/createInfiniteQuery.md @@ -392,11 +392,11 @@ to page through the query. | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/svelte/reference/functions/createQuery.md b/docs/framework/svelte/reference/functions/createQuery.md index ee55a53e413..90ec04f5be1 100644 --- a/docs/framework/svelte/reference/functions/createQuery.md +++ b/docs/framework/svelte/reference/functions/createQuery.md @@ -160,9 +160,9 @@ be used. [`CreateQueryResult`](../type-aliases/CreateQueryResult.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even -if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived -booleans for convenience. +after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns +`undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` +are derived booleans for convenience. ### See @@ -270,9 +270,9 @@ be used. [`CreateQueryResult`](../type-aliases/CreateQueryResult.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even -if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived -booleans for convenience. +after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns +`undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` +are derived booleans for convenience. ### See @@ -439,9 +439,9 @@ be used. [`CreateQueryResult`](../type-aliases/CreateQueryResult.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even -if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived -booleans for convenience. +after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns +`undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` +are derived booleans for convenience. @@ -466,11 +466,11 @@ booleans for convenience. | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `refetch` | (`options?`: [`RefetchOptions`](../interfaces/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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md index e7f00bef35e..f48ef8c471c 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index eb3f64c0b4c..b5ce3f86221 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -52,7 +52,7 @@ An infinite query result in the `error` state with no data to display, since a f | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingResult.md index b57dff2a855..dd6a84dfc28 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPendingResult.md index 5cf4e780700..9366e704022 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index 4422ee20e57..b7463c3f5a3 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,7 +53,7 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 53010451c7f..14a67291f0a 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,7 +53,7 @@ failed. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 9331ad6dc18..518e0183cd7 100644 --- a/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/svelte/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,7 +52,7 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md index 2201c3da5a8..2305064067a 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverBaseResult.md @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverLoadingErrorResult.md index 6b079402249..04e30e2964e 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverLoadingResult.md index 1d9a1e0af52..2af4c1ac94f 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverPendingResult.md index 3353fc90b03..7bb6710c3e8 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverPlaceholderResult.md index 63ee2238e15..684353611a9 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,7 +45,7 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverRefetchErrorResult.md index d2348c602f5..f369206d490 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state that keeps the data from before a fetch or ` | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/svelte/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/svelte/reference/interfaces/QueryObserverSuccessResult.md index 808cccf6dd6..1d0d7cc4b9c 100644 --- a/docs/framework/svelte/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/svelte/reference/interfaces/QueryObserverSuccessResult.md @@ -44,7 +44,7 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/vue/reference/functions/useQuery.md b/docs/framework/vue/reference/functions/useQuery.md index b8d83104118..106a9ad5bb2 100644 --- a/docs/framework/vue/reference/functions/useQuery.md +++ b/docs/framework/vue/reference/functions/useQuery.md @@ -162,11 +162,11 @@ will be used. [`UseQueryReturnType`](../type-aliases/UseQueryReturnType.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even if -`select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived boolean -`ref`s for convenience. `state` is that result as one readonly reactive object — `state.data`, -`state.isPending`, and the rest are plain values, and `state.status === 'success'` narrows `state.data` to -`TData`. +after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns +`undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` are +derived boolean `ref`s for convenience. `state` is that result as one readonly reactive object — +`state.data`, `state.isPending`, and the rest are plain values, and `state.status === 'success'` narrows +`state.data` to `TData`. ### Examples @@ -367,11 +367,11 @@ will be used. [`UseQueryReturnType`](../type-aliases/UseQueryReturnType.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even if -`select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived boolean -`ref`s for convenience. `state` is that result as one readonly reactive object — `state.data`, -`state.isPending`, and the rest are plain values, and `state.status === 'success'` narrows `state.data` to -`TData`. +after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns +`undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` are +derived boolean `ref`s for convenience. `state` is that result as one readonly reactive object — +`state.data`, `state.isPending`, and the rest are plain values, and `state.status === 'success'` narrows +`state.data` to `TData`. ### Examples @@ -446,8 +446,8 @@ will be used. [`UseQueryReturnType`](../type-aliases/UseQueryReturnType.md)\<`TData`, `TError`\> The current query result. `status` is `error` if the query has an error from a fetch that failed -after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even if -`select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived boolean -`ref`s for convenience. `state` is that result as one readonly reactive object — `state.data`, -`state.isPending`, and the rest are plain values, and `state.status === 'success'` narrows `state.data` to -`TData`. +after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns +`undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` are +derived boolean `ref`s for convenience. `state` is that result as one readonly reactive object — +`state.data`, `state.isPending`, and the rest are plain values, and `state.status === 'success'` narrows +`state.data` to `TData`. diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md index e7f00bef35e..f48ef8c471c 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverBaseResult.md @@ -63,11 +63,11 @@ them, like `hasNextPage` and `isFetchingNextPage`. | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md index eb3f64c0b4c..b5ce3f86221 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingErrorResult.md @@ -52,7 +52,7 @@ An infinite query result in the `error` state with no data to display, since a f | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingResult.md index b57dff2a855..dd6a84dfc28 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverLoadingResult.md @@ -53,11 +53,11 @@ An infinite query result in the `pending` state while the first fetch is in flig | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPendingResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPendingResult.md index 5cf4e780700..9366e704022 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPendingResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPendingResult.md @@ -52,11 +52,11 @@ An infinite query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isSuccess`](InfiniteQueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`status`](InfiniteQueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md index 4422ee20e57..b7463c3f5a3 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverPlaceholderResult.md @@ -53,7 +53,7 @@ no data yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md index 53010451c7f..14a67291f0a 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverRefetchErrorResult.md @@ -53,7 +53,7 @@ failed. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error, still has data to display, and didn't fail fetching a page. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverSuccessResult.md b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverSuccessResult.md index 9331ad6dc18..518e0183cd7 100644 --- a/docs/framework/vue/reference/interfaces/InfiniteQueryObserverSuccessResult.md +++ b/docs/framework/vue/reference/interfaces/InfiniteQueryObserverSuccessResult.md @@ -52,7 +52,7 @@ An infinite query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoading`](InfiniteQueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isLoadingError`](InfiniteQueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPending`](InfiniteQueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isPlaceholderData`](InfiniteQueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`InfiniteQueryObserverBaseResult`](InfiniteQueryObserverBaseResult.md).[`isRefetchError`](InfiniteQueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md b/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md index 2201c3da5a8..2305064067a 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverBaseResult.md @@ -51,11 +51,11 @@ The properties shared by every state of a query result, like `data`, `error`, `s | `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 has an error and no data to display. | | `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 `true` if the query has no cached data, no `placeholderData` and no error. | +| `isPending` | `boolean` | Will be `true` if the query has no cached data, no data from `placeholderData` and no error. | | `isPlaceholderData` | `boolean` | Will be `true` if the data shown is the placeholder data. | | `isRefetchError` | `boolean` | Will be `true` if the query has an error and still has data to display (for infinite queries, not after a failed page fetch). | | `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 cached data or `placeholderData` and no error. | +| `isSuccess` | `boolean` | A derived boolean from the `status` variable, provided for convenience. - `true` if the query has cached data or data from `placeholderData`, and no error. | | `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: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. | +| `status` | `"error"` \| `"pending"` \| `"success"` | The status of the query. - Will be: - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverLoadingErrorResult.md b/docs/framework/vue/reference/interfaces/QueryObserverLoadingErrorResult.md index 6b079402249..04e30e2964e 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverLoadingErrorResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverLoadingErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state with no data to display, since a fetch or `s | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `true` | `true`, since the query has an error and no data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverLoadingResult.md b/docs/framework/vue/reference/interfaces/QueryObserverLoadingResult.md index 1d9a1e0af52..2af4c1ac94f 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverLoadingResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverLoadingResult.md @@ -45,11 +45,11 @@ A query result in the `pending` state while the first fetch is in flight, so `is | `isLoading` | `true` | `true`, since the first fetch is in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverPendingResult.md b/docs/framework/vue/reference/interfaces/QueryObserverPendingResult.md index 3353fc90b03..7bb6710c3e8 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverPendingResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverPendingResult.md @@ -44,11 +44,11 @@ A query result in the `pending` state: the query has no data yet. | `isLoading` | `boolean` | Is `true` whenever the first fetch for a query is in-flight. - Is the same as `isFetching && isPending`. | - | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `true` | `true`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `true` | `true`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `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` | `false` | `false`, since the query isn't in the `success` state. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isSuccess`](QueryObserverBaseResult.md#property-issuccess) | | `refetch` | (`options?`: [`RefetchOptions`](RefetchOptions.md)) => `Promise`\<[`QueryObserverResult`](../type-aliases/QueryObserverResult.md)\<`TData`, `TError`\>\> | A function to manually refetch the query. | - | -| `status` | `"pending"` | `'pending'`, since the query has no cached data, no `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | +| `status` | `"pending"` | `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`status`](QueryObserverBaseResult.md#property-status) | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverPlaceholderResult.md b/docs/framework/vue/reference/interfaces/QueryObserverPlaceholderResult.md index 63ee2238e15..684353611a9 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverPlaceholderResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverPlaceholderResult.md @@ -45,7 +45,7 @@ yet. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `true` | `true`, since the data shown is the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverRefetchErrorResult.md b/docs/framework/vue/reference/interfaces/QueryObserverRefetchErrorResult.md index d2348c602f5..f369206d490 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverRefetchErrorResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverRefetchErrorResult.md @@ -44,7 +44,7 @@ A query result in the `error` state that keeps the data from before a fetch or ` | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `true` | `true`, since the query has an error and still has data to display. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/docs/framework/vue/reference/interfaces/QueryObserverSuccessResult.md b/docs/framework/vue/reference/interfaces/QueryObserverSuccessResult.md index 808cccf6dd6..1d0d7cc4b9c 100644 --- a/docs/framework/vue/reference/interfaces/QueryObserverSuccessResult.md +++ b/docs/framework/vue/reference/interfaces/QueryObserverSuccessResult.md @@ -44,7 +44,7 @@ A query result in the `success` state with data from the cache. | `isLoading` | `false` | `false`, since the first fetch isn't in flight. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoading`](QueryObserverBaseResult.md#property-isloading) | | `isLoadingError` | `false` | `false`, since the query didn't fail while fetching for the first time. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isLoadingError`](QueryObserverBaseResult.md#property-isloadingerror) | | `isPaused` | `boolean` | A derived boolean from the `fetchStatus` variable, provided for convenience. - The query wanted to fetch, but has been `paused`. | - | -| `isPending` | `false` | `false`, since the query has cached data, `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | +| `isPending` | `false` | `false`, since the query has cached data, data from `placeholderData` or an error. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPending`](QueryObserverBaseResult.md#property-ispending) | | `isPlaceholderData` | `false` | `false`, since the data shown isn't the `placeholderData`. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isPlaceholderData`](QueryObserverBaseResult.md#property-isplaceholderdata) | | `isRefetchError` | `false` | `false`, since the query didn't fail while refetching. | [`QueryObserverBaseResult`](QueryObserverBaseResult.md).[`isRefetchError`](QueryObserverBaseResult.md#property-isrefetcherror) | | `isRefetching` | `boolean` | Is `true` whenever a background refetch is in-flight, which _does not_ include initial `pending`. - Is the same as `isFetching && !isPending`. | - | diff --git a/packages/angular-query-experimental/src/inject-query.ts b/packages/angular-query-experimental/src/inject-query.ts index e36e1d0cd2d..73cdc95c62d 100644 --- a/packages/angular-query-experimental/src/inject-query.ts +++ b/packages/angular-query-experimental/src/inject-query.ts @@ -91,9 +91,9 @@ export function injectQuery< * context, so signals read inside it (in `queryKey`, `enabled`, etc.) drive the query. * @param options - Additional configuration * @returns The query result. `status()` is `'error'` if the query has an error from a fetch that failed - * after its retries or if `select` threw, `'success'` if the query has cached data or `placeholderData` - * (even if `select` returns `undefined`), and `'pending'` otherwise. `isPending`/`isSuccess`/`isError` - * are type-guard methods for convenience. + * after its retries or if `select` threw, `'success'` if the query has cached data (even if `select` + * returns `undefined`) or data from `placeholderData`, and `'pending'` otherwise. + * `isPending`/`isSuccess`/`isError` are type-guard methods for convenience. * @see https://tanstack.com/query/latest/docs/framework/angular/guides/queries * @see {@link queryOptions} to share these options between `injectQuery` and imperative APIs like * `queryClient.fetchQuery`. diff --git a/packages/preact-query/src/useQuery.ts b/packages/preact-query/src/useQuery.ts index df4330be063..0e5cd73bd26 100644 --- a/packages/preact-query/src/useQuery.ts +++ b/packages/preact-query/src/useQuery.ts @@ -65,9 +65,9 @@ export function useQuery< * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will * be used. * @returns The current query result. `status` is `error` if the query has an error from a fetch that failed - * after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even - * if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived - * booleans for convenience. + * after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns + * `undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` + * are derived booleans for convenience. * @see {@link queryOptions} to share these options between `useQuery` and imperative APIs like `queryClient.query`. * @example * ```tsx @@ -134,9 +134,9 @@ export function useQuery< * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will * be used. * @returns The current query result. `status` is `error` if the query has an error from a fetch that failed - * after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even - * if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived - * booleans for convenience. + * after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns + * `undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` + * are derived booleans for convenience. * @see {@link queryOptions} to share these options between `useQuery` and imperative APIs like `queryClient.query`. * @example * ```tsx diff --git a/packages/query-core/src/types.ts b/packages/query-core/src/types.ts index 3f661a203c4..71765403296 100644 --- a/packages/query-core/src/types.ts +++ b/packages/query-core/src/types.ts @@ -1019,7 +1019,7 @@ export interface QueryObserverBaseResult< */ isLoading: boolean /** - * Will be `true` if the query has no cached data, no `placeholderData` and no error. + * Will be `true` if the query has no cached data, no data from `placeholderData` and no error. */ isPending: boolean /** @@ -1055,7 +1055,7 @@ export interface QueryObserverBaseResult< isStale: boolean /** * A derived boolean from the `status` variable, provided for convenience. - * - `true` if the query has cached data or `placeholderData` and no error. + * - `true` if the query has cached data or data from `placeholderData`, and no error. */ isSuccess: boolean /** @@ -1072,8 +1072,8 @@ export interface QueryObserverBaseResult< * The status of the query. * - Will be: * - `error` if the query has an error from a fetch that failed after its retries, or if `select` threw. - * - `success` if the query has cached data or `placeholderData` and no error, even if `select` returns `undefined`. - * - `pending` otherwise, since the query has no cached data, no `placeholderData` and no error. + * - `success` if the query has cached data (even if `select` returns `undefined`) or data from `placeholderData`, and no error. + * - `pending` otherwise, since the query has no cached data, no data from `placeholderData` and no error. */ status: QueryStatus /** @@ -1106,7 +1106,7 @@ export interface QueryObserverPendingResult< */ isError: false /** - * `true`, since the query has no cached data, no `placeholderData` and no error. + * `true`, since the query has no cached data, no data from `placeholderData` and no error. */ isPending: true /** @@ -1126,7 +1126,7 @@ export interface QueryObserverPendingResult< */ isPlaceholderData: false /** - * `'pending'`, since the query has no cached data, no `placeholderData` and no error. + * `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. */ status: 'pending' } @@ -1152,7 +1152,7 @@ export interface QueryObserverLoadingResult< */ isError: false /** - * `true`, since the query has no cached data, no `placeholderData` and no error. + * `true`, since the query has no cached data, no data from `placeholderData` and no error. */ isPending: true /** @@ -1176,7 +1176,7 @@ export interface QueryObserverLoadingResult< */ isPlaceholderData: false /** - * `'pending'`, since the query has no cached data, no `placeholderData` and no error. + * `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. */ status: 'pending' } @@ -1201,7 +1201,7 @@ export interface QueryObserverLoadingErrorResult< */ isError: true /** - * `false`, since the query has cached data, `placeholderData` or an error. + * `false`, since the query has cached data, data from `placeholderData` or an error. */ isPending: false /** @@ -1250,7 +1250,7 @@ export interface QueryObserverRefetchErrorResult< */ isError: true /** - * `false`, since the query has cached data, `placeholderData` or an error. + * `false`, since the query has cached data, data from `placeholderData` or an error. */ isPending: false /** @@ -1299,7 +1299,7 @@ export interface QueryObserverSuccessResult< */ isError: false /** - * `false`, since the query has cached data, `placeholderData` or an error. + * `false`, since the query has cached data, data from `placeholderData` or an error. */ isPending: false /** @@ -1350,7 +1350,7 @@ export interface QueryObserverPlaceholderResult< */ error: null /** - * `false`, since the query has cached data, `placeholderData` or an error. + * `false`, since the query has cached data, data from `placeholderData` or an error. */ isPending: false /** @@ -1468,7 +1468,7 @@ export interface InfiniteQueryObserverPendingResult< */ isError: false /** - * `true`, since the query has no cached data, no `placeholderData` and no error. + * `true`, since the query has no cached data, no data from `placeholderData` and no error. */ isPending: true /** @@ -1496,7 +1496,7 @@ export interface InfiniteQueryObserverPendingResult< */ isPlaceholderData: false /** - * `'pending'`, since the query has no cached data, no `placeholderData` and no error. + * `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. */ status: 'pending' } @@ -1522,7 +1522,7 @@ export interface InfiniteQueryObserverLoadingResult< */ isError: false /** - * `true`, since the query has no cached data, no `placeholderData` and no error. + * `true`, since the query has no cached data, no data from `placeholderData` and no error. */ isPending: true /** @@ -1554,7 +1554,7 @@ export interface InfiniteQueryObserverLoadingResult< */ isPlaceholderData: false /** - * `'pending'`, since the query has no cached data, no `placeholderData` and no error. + * `'pending'`, since the query has no cached data, no data from `placeholderData` and no error. */ status: 'pending' } @@ -1579,7 +1579,7 @@ export interface InfiniteQueryObserverLoadingErrorResult< */ isError: true /** - * `false`, since the query has cached data, `placeholderData` or an error. + * `false`, since the query has cached data, data from `placeholderData` or an error. */ isPending: false /** @@ -1637,7 +1637,7 @@ export interface InfiniteQueryObserverRefetchErrorResult< */ isError: true /** - * `false`, since the query has cached data, `placeholderData` or an error. + * `false`, since the query has cached data, data from `placeholderData` or an error. */ isPending: false /** @@ -1686,7 +1686,7 @@ export interface InfiniteQueryObserverSuccessResult< */ isError: false /** - * `false`, since the query has cached data, `placeholderData` or an error. + * `false`, since the query has cached data, data from `placeholderData` or an error. */ isPending: false /** @@ -1745,7 +1745,7 @@ export interface InfiniteQueryObserverPlaceholderResult< */ error: null /** - * `false`, since the query has cached data, `placeholderData` or an error. + * `false`, since the query has cached data, data from `placeholderData` or an error. */ isPending: false /** diff --git a/packages/react-query/src/useQuery.ts b/packages/react-query/src/useQuery.ts index 422b2ec07b6..9fa86768eaf 100644 --- a/packages/react-query/src/useQuery.ts +++ b/packages/react-query/src/useQuery.ts @@ -65,9 +65,9 @@ export function useQuery< * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will * be used. * @returns The current query result. `status` is `error` if the query has an error from a fetch that failed - * after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even - * if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived - * booleans for convenience. + * after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns + * `undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` + * are derived booleans for convenience. * @see {@link queryOptions} to share these options between `useQuery` and imperative APIs like `queryClient.query`. * @example * ```tsx @@ -134,9 +134,9 @@ export function useQuery< * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will * be used. * @returns The current query result. `status` is `error` if the query has an error from a fetch that failed - * after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even - * if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived - * booleans for convenience. + * after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns + * `undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` + * are derived booleans for convenience. * @see {@link queryOptions} to share these options between `useQuery` and imperative APIs like `queryClient.query`. * @example * ```tsx diff --git a/packages/solid-query/src/useQuery.ts b/packages/solid-query/src/useQuery.ts index 5c3c513f742..9c07621bf9d 100644 --- a/packages/solid-query/src/useQuery.ts +++ b/packages/solid-query/src/useQuery.ts @@ -73,8 +73,8 @@ export function useQuery< * @param queryClient - An accessor for a custom `QueryClient`. Otherwise, the one from the nearest context * will be used. * @returns The current query result, as a Solid store. `status` is `error` if the query has an error from - * a fetch that failed after its retries or if `select` threw, `success` if the query has cached data or - * `placeholderData` (even if `select` returns `undefined`), and `pending` otherwise. + * a fetch that failed after its retries or if `select` threw, `success` if the query has cached data + * (even if `select` returns `undefined`) or data from `placeholderData`, and `pending` otherwise. * `isPending`/`isSuccess`/`isError` are derived booleans for convenience. * @see {@link queryOptions} to share these options between `useQuery` and imperative APIs like `queryClient.query`. * @example diff --git a/packages/svelte-query/src/createQuery.ts b/packages/svelte-query/src/createQuery.ts index e64657d9a65..0fbaa66b5fc 100644 --- a/packages/svelte-query/src/createQuery.ts +++ b/packages/svelte-query/src/createQuery.ts @@ -72,9 +72,9 @@ export function createQuery< * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will * be used. * @returns The current query result. `status` is `error` if the query has an error from a fetch that failed - * after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even - * if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived - * booleans for convenience. + * after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns + * `undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` + * are derived booleans for convenience. * @see {@link queryOptions} to share these options between `createQuery` and imperative APIs like `queryClient.query`. * @example * ```svelte @@ -145,9 +145,9 @@ export function createQuery< * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will * be used. * @returns The current query result. `status` is `error` if the query has an error from a fetch that failed - * after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even - * if `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived - * booleans for convenience. + * after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns + * `undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` + * are derived booleans for convenience. * @see {@link queryOptions} to share these options between `createQuery` and imperative APIs like `queryClient.query`. * @example * `select` derives whatever `data` a component needs from the cached value, without changing what's diff --git a/packages/vue-query/src/useQuery.ts b/packages/vue-query/src/useQuery.ts index 976422ee045..84fca30dd4c 100644 --- a/packages/vue-query/src/useQuery.ts +++ b/packages/vue-query/src/useQuery.ts @@ -95,11 +95,11 @@ export function useQuery< * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one provided by `VueQueryPlugin` * will be used. * @returns The current query result. `status` is `error` if the query has an error from a fetch that failed - * after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even if - * `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived boolean - * `ref`s for convenience. `state` is that result as one readonly reactive object — `state.data`, - * `state.isPending`, and the rest are plain values, and `state.status === 'success'` narrows `state.data` to - * `TData`. + * after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns + * `undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` are + * derived boolean `ref`s for convenience. `state` is that result as one readonly reactive object — + * `state.data`, `state.isPending`, and the rest are plain values, and `state.status === 'success'` narrows + * `state.data` to `TData`. * @example * A query key built from a reactive `ref` — the query refetches whenever `postId` changes: * ```vue @@ -264,11 +264,11 @@ export function useQuery< * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one provided by `VueQueryPlugin` * will be used. * @returns The current query result. `status` is `error` if the query has an error from a fetch that failed - * after its retries or if `select` threw, `success` if the query has cached data or `placeholderData` (even if - * `select` returns `undefined`), and `pending` otherwise. `isPending`/`isSuccess`/`isError` are derived boolean - * `ref`s for convenience. `state` is that result as one readonly reactive object — `state.data`, - * `state.isPending`, and the rest are plain values, and `state.status === 'success'` narrows `state.data` to - * `TData`. + * after its retries or if `select` threw, `success` if the query has cached data (even if `select` returns + * `undefined`) or data from `placeholderData`, and `pending` otherwise. `isPending`/`isSuccess`/`isError` are + * derived boolean `ref`s for convenience. `state` is that result as one readonly reactive object — + * `state.data`, `state.isPending`, and the rest are plain values, and `state.status === 'success'` narrows + * `state.data` to `TData`. * @example * Passing a whole-options getter so `staleTime` reacts to a setting stored elsewhere, not just `queryKey`: * ```vue