0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-18 19:33:22 +00:00
query/docs/framework/solid/reference/interfaces/InfiniteQueryPageParamsOptions.md
Wonsuk Choi f38e6271b4
chore(*): update '@tanstack/typedoc-config' to v0.3.5 (#12035)
* chore(scripts/generate-docs): read type alias bodies whose type parameters have defaults

* chore(*): update '@tanstack/typedoc-config' to v0.3.5
2026-10-17 11:14:03 +09:00

1.9 KiB

id title
InfiniteQueryPageParamsOptions InfiniteQueryPageParamsOptions

Defined in: packages/query-core/src/types.ts:485

The page param options of an infinite query: initialPageParam, and the getNextPageParam and getPreviousPageParam functions that compute the params of the pages around it.

Extends

Type Parameters

TQueryFnData

TQueryFnData = unknown

TPageParam

TPageParam = unknown

Properties

Property Type Description
getNextPageParam (lastPage: TQueryFnData, allPages: TQueryFnData[], lastPageParam: TPageParam, allPageParams: TPageParam[]) => TPageParam | null | undefined This function can be set to automatically get the next cursor for infinite queries. The result will also be used to determine the value of hasNextPage.
getPreviousPageParam? (firstPage: TQueryFnData, allPages: TQueryFnData[], firstPageParam: TPageParam, allPageParams: TPageParam[]) => TPageParam | null | undefined This function can be set to automatically get the previous cursor for infinite queries. The result will also be used to determine the value of hasPreviousPage.
initialPageParam TPageParam The page param to start from when an infinite query has no pages yet. It is passed to queryFn as pageParam for the first page; every page after that gets the value returned by getNextPageParam or getPreviousPageParam. It only applies while the query has no pages: once a first page exists, refetching starts from that page's own param instead.