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

Method prefetchInfiniteQuery

packages/query-core/src/queryClient.ts:718–735  ·  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

716 * @deprecated Use queryClient.infiniteQuery(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.
717 */
718 prefetchInfiniteQuery<
719 TQueryFnData,
720 TError = DefaultError,
721 TData = TQueryFnData,
722 TQueryKey extends QueryKey = QueryKey,
723 TPageParam = unknown,
724 >(
725 options: FetchInfiniteQueryOptions<
726 TQueryFnData,
727 TError,
728 TData,
729 TQueryKey,
730 TPageParam
731 >,
732 ): Promise<void> {
733 // eslint-disable-next-line no-restricted-syntax
734 return this.fetchInfiniteQuery(options).then(noop).catch(noop)
735 }
736
737 /**
738 * @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