* Asynchronous method to fetch and cache an infinite query, resolving with an * InfiniteData object or throwing with the error. * * Behaves like QueryClient#query, accepting the same options (minus * `initialPageParam`), plus the required `initialPageParam`, and an option
(
options: InfiniteQueryExecuteOptions<
TQueryFnData,
TError,
TData,
TQueryKey,
TPageParam
>,
)
| 667 | * ``` |
| 668 | */ |
| 669 | infiniteQuery< |
| 670 | TQueryFnData, |
| 671 | TError = DefaultError, |
| 672 | TData = InfiniteData<TQueryFnData>, |
| 673 | TQueryKey extends QueryKey = QueryKey, |
| 674 | TPageParam = unknown, |
| 675 | >( |
| 676 | options: InfiniteQueryExecuteOptions< |
| 677 | TQueryFnData, |
| 678 | TError, |
| 679 | TData, |
| 680 | TQueryKey, |
| 681 | TPageParam |
| 682 | >, |
| 683 | ): Promise< |
| 684 | Array<TData> extends Array<InfiniteData<TQueryFnData>> |
| 685 | ? InfiniteData<TQueryFnData, TPageParam> |
| 686 | : TData |
| 687 | > { |
| 688 | options._type = 'infinite' |
| 689 | return this.query(options as any) |
| 690 | } |
| 691 | |
| 692 | /** |
| 693 | * @deprecated Use queryClient.infiniteQuery(options) instead. This method will be removed in the next major version. |
no test coverage detected