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