infiniteQueryOptions

Function: infiniteQueryOptions()

Allows to share and re-use infinite query options in a type-safe way.

The queryKey will be tagged with the type from queryFn.

Param

The infinite query options to tag with the type from queryFn.

infiniteQueryOptions(options)

ts
function infiniteQueryOptions<
  TQueryFnData,
  TError,
  TData,
  TQueryKey,
  TPageParam,
>(
  options,
): UndefinedInitialDataInfiniteOptions<
  TQueryFnData,
  TError,
  TData,
  TQueryKey,
  TPageParam
> &
  object
function infiniteQueryOptions<
  TQueryFnData,
  TError,
  TData,
  TQueryKey,
  TPageParam,
>(
  options,
): UndefinedInitialDataInfiniteOptions<
  TQueryFnData,
  TError,
  TData,
  TQueryKey,
  TPageParam
> &
  object

Allows to share and re-use infinite query options in a type-safe way.

The queryKey will be tagged with the type from queryFn.

Type Parameters

TQueryFnData

TError = Error

TData = InfiniteData<TQueryFnData, unknown>

TQueryKey extends QueryKey = QueryKey

TPageParam = unknown

Parameters

options: UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>

The infinite query options to tag with the type from queryFn.

Returns

UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & object

The tagged infinite query options.

The tagged infinite query options.

Param

The infinite query options to tag with the type from queryFn.

Defined in

infinite-query-options.ts:59

infiniteQueryOptions(options)

ts
function infiniteQueryOptions<
  TQueryFnData,
  TError,
  TData,
  TQueryKey,
  TPageParam,
>(
  options,
): DefinedInitialDataInfiniteOptions<
  TQueryFnData,
  TError,
  TData,
  TQueryKey,
  TPageParam
> &
  object
function infiniteQueryOptions<
  TQueryFnData,
  TError,
  TData,
  TQueryKey,
  TPageParam,
>(
  options,
): DefinedInitialDataInfiniteOptions<
  TQueryFnData,
  TError,
  TData,
  TQueryKey,
  TPageParam
> &
  object

Allows to share and re-use infinite query options in a type-safe way.

The queryKey will be tagged with the type from queryFn.

Type Parameters

TQueryFnData

TError = Error

TData = InfiniteData<TQueryFnData, unknown>

TQueryKey extends QueryKey = QueryKey

TPageParam = unknown

Parameters

options: DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>

The infinite query options to tag with the type from queryFn.

Returns

DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & object

The tagged infinite query options.

The tagged infinite query options.

Param

The infinite query options to tag with the type from queryFn.

Defined in

infinite-query-options.ts:91