TanStack
API Reference

DefinedInitialDataInfiniteOptions

ts
type DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> = Accessor<InfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & object>;

Defined in: packages/solid-query/src/infiniteQueryOptions.ts:46

The options accepted by the infiniteQueryOptions overload selected when initialData is set — data is never undefined (unless a select changes TData to include undefined).

Type Parameters

TQueryFnData

TQueryFnData

The type of a single page, as your queryFn resolves it.

TError

TError = DefaultError

The type of errors your queryFn may throw.

TData

TData = InfiniteData<TQueryFnData>

The type data ends up as after select runs — defaults to InfiniteData<TQueryFnData>, the shape of all fetched pages plus their page params.

TQueryKey

TQueryKey extends QueryKey = QueryKey

The type of your queryKey.

TPageParam

TPageParam = unknown

The type of the parameter passed to queryFn to fetch a given page.