MCPcopy Create free account
hub / github.com/TanStack/query / prefetchInfiniteQuery

Method prefetchInfiniteQuery

packages/query-core/src/queryClient.ts:725–742  ·  view source on GitHub ↗

* @deprecated Use queryClient.infiniteQuery(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.

(
    options: FetchInfiniteQueryOptions<
      TQueryFnData,
      TError,
      TData,
      TQueryKey,
      TPageParam
    >,
  )

Source from the content-addressed store, hash-verified

723 * @deprecated Use queryClient.infiniteQuery(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.
724 */
725 prefetchInfiniteQuery<
726 TQueryFnData,
727 TError = DefaultError,
728 TData = TQueryFnData,
729 TQueryKey extends QueryKey = QueryKey,
730 TPageParam = unknown,
731 >(
732 options: FetchInfiniteQueryOptions<
733 TQueryFnData,
734 TError,
735 TData,
736 TQueryKey,
737 TPageParam
738 >,
739 ): Promise<void> {
740 // eslint-disable-next-line no-restricted-syntax
741 return this.fetchInfiniteQuery(options).then(noop).catch(noop)
742 }
743
744 /**
745 * @deprecated Use queryClient.infiniteQuery({ ...options, staleTime: 'static' }) instead. This method will be removed in the next major version.

Callers 8

ExamplesFunction · 0.45
ExamplesFunction · 0.45
ExamplesFunction · 0.45
ExamplesFunction · 0.45
ExamplesFunction · 0.45
ExamplesFunction · 0.45

Calls 1

fetchInfiniteQueryMethod · 0.95

Tested by

no test coverage detected