Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

InitialPageParam.md

26 lines995 Bytes

1---
2id: InitialPageParam
3title: InitialPageParam
4---
5​
6<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7​
8Defined in: [packages/query-core/src/types.ts:470](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L470)
9​
10Holds the `initialPageParam` option that every infinite query requires.
11​
12## Extended by
13​
14- [`InfiniteQueryPageParamsOptions`](InfiniteQueryPageParamsOptions.md)
15​
16## Type Parameters
17​
18### TPageParam
19​
20`TPageParam` = `unknown`
21​
22## Properties
23​
24| Property | Type | Description |
25| ------ | ------ | ------ |
26| <a id="property-initialpageparam"></a> `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. |