* Fetches and caches an infinite query, or returns its cached data if it isn't stale. * @param options - The infinite query options, including the `queryKey`, the `queryFn`, and the * `initialPageParam`. * @returns A promise that resolves to the cached or fetched InfiniteData, or re
(
options: FetchInfiniteQueryOptions<
TQueryFnData,
TError,
TData,
TQueryKey,
TPageParam
>,
)
| 755 | * @deprecated Use queryClient.infiniteQuery(options) instead. This method will be removed in the next major version. |
| 756 | */ |
| 757 | fetchInfiniteQuery< |
| 758 | TQueryFnData, |
| 759 | TError = DefaultError, |
| 760 | TData = TQueryFnData, |
| 761 | TQueryKey extends QueryKey = QueryKey, |
| 762 | TPageParam = unknown, |
| 763 | >( |
| 764 | options: FetchInfiniteQueryOptions< |
| 765 | TQueryFnData, |
| 766 | TError, |
| 767 | TData, |
| 768 | TQueryKey, |
| 769 | TPageParam |
| 770 | >, |
| 771 | ): Promise<InfiniteData<TData, TPageParam>> { |
| 772 | options._type = 'infinite' |
| 773 | // oxlint-disable-next-line tanstack-query/no-restricted-syntax |
| 774 | return this.fetchQuery(options as any) |
| 775 | } |
| 776 | |
| 777 | /** |
| 778 | * Fetches and caches an infinite query like {@link QueryClient#fetchInfiniteQuery}, but ignores |
no test coverage detected