* Returns the cached data of an infinite query, or fetches it if there is none. With * `revalidateIfStale`, stale cached data is also refetched in the background. * @param options - The infinite query options. If the query has no cached data yet, it is fetched * with these options. * @re
(
options: EnsureInfiniteQueryDataOptions<
TQueryFnData,
TError,
TData,
TQueryKey,
TPageParam
>,
)
| 811 | * @deprecated Use queryClient.infiniteQuery({ ...options, staleTime: 'static' }) instead. This method will be removed in the next major version. |
| 812 | */ |
| 813 | ensureInfiniteQueryData< |
| 814 | TQueryFnData, |
| 815 | TError = DefaultError, |
| 816 | TData = TQueryFnData, |
| 817 | TQueryKey extends QueryKey = QueryKey, |
| 818 | TPageParam = unknown, |
| 819 | >( |
| 820 | options: EnsureInfiniteQueryDataOptions< |
| 821 | TQueryFnData, |
| 822 | TError, |
| 823 | TData, |
| 824 | TQueryKey, |
| 825 | TPageParam |
| 826 | >, |
| 827 | ): Promise<InfiniteData<TData, TPageParam>> { |
| 828 | options._type = 'infinite' |
| 829 | |
| 830 | // oxlint-disable-next-line tanstack-query/no-restricted-syntax |
| 831 | return this.ensureQueryData(options as any) |
| 832 | } |
| 833 | |
| 834 | /** |
| 835 | * Resumes mutations that were paused because there was no network connection. Does nothing |
no test coverage detected