* 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
>,
)
| 762 | * @deprecated Use queryClient.infiniteQuery(options) instead. This method will be removed in the next major version. |
| 763 | */ |
| 764 | fetchInfiniteQuery< |
| 765 | TQueryFnData, |
| 766 | TError = DefaultError, |
| 767 | TData = TQueryFnData, |
| 768 | TQueryKey extends QueryKey = QueryKey, |
| 769 | TPageParam = unknown, |
| 770 | >( |
| 771 | options: FetchInfiniteQueryOptions< |
| 772 | TQueryFnData, |
| 773 | TError, |
| 774 | TData, |
| 775 | TQueryKey, |
| 776 | TPageParam |
| 777 | >, |
| 778 | ): Promise<InfiniteData<TData, TPageParam>> { |
| 779 | options._type = 'infinite' |
| 780 | // oxlint-disable-next-line tanstack-query/no-restricted-syntax |
| 781 | return this.fetchQuery(options as any) |
| 782 | } |
| 783 | |
| 784 | /** |
| 785 | * Fetches and caches an infinite query like {@link QueryClient#fetchInfiniteQuery}, but ignores |
no test coverage detected