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