* Fetches and caches an infinite query like QueryClient#fetchInfiniteQuery, but ignores * the result and any error. * @param options - The infinite query options, including the `queryKey`, the `queryFn`, and the * `initialPageParam`. * @returns A promise that resolves once the fe
(
options: FetchInfiniteQueryOptions<
TQueryFnData,
TError,
TData,
TQueryKey,
TPageParam
>,
)
| 783 | * @deprecated Use queryClient.infiniteQuery(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version. |
| 784 | */ |
| 785 | prefetchInfiniteQuery< |
| 786 | TQueryFnData, |
| 787 | TError = DefaultError, |
| 788 | TData = TQueryFnData, |
| 789 | TQueryKey extends QueryKey = QueryKey, |
| 790 | TPageParam = unknown, |
| 791 | >( |
| 792 | options: FetchInfiniteQueryOptions< |
| 793 | TQueryFnData, |
| 794 | TError, |
| 795 | TData, |
| 796 | TQueryKey, |
| 797 | TPageParam |
| 798 | >, |
| 799 | ): Promise<void> { |
| 800 | // oxlint-disable-next-line tanstack-query/no-restricted-syntax |
| 801 | return this.fetchInfiniteQuery(options).then(noop).catch(noop) |
| 802 | } |
| 803 | |
| 804 | /** |
| 805 | * Returns the cached data of an infinite query, or fetches it if there is none. With |
no test coverage detected