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

InfiniteData.md

26 lines801 Bytes

1---
2id: InfiniteData
3title: InfiniteData
4---
5​
6Defined in: [packages/query-core/src/types.ts:315](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L315)
7​
8The data shape of an infinite query: every page fetched so far, plus the page param each one was fetched with.
9`pages` and `pageParams` are index-aligned β€” `pageParams[i]` is the param that produced `pages[i]`.
10​
11## Type Parameters
12​
13### TData
14​
15`TData`
16​
17### TPageParam
18​
19`TPageParam` = `unknown`
20​
21## Properties
22​
23| Property | Type | Description |
24| ------ | ------ | ------ |
25| <a id="property-pageparams"></a> `pageParams` | `TPageParam`[] | The page param each page was fetched with, aligned by index with `pages`. |
26| <a id="property-pages"></a> `pages` | `TData`[] | The data of every page fetched so far, in order. |