Skip to main content

PageInfo

Metadata about a page of query results that can help to inform how to fetch subsequent pages as well as present the data to an end user.

1
type PageInfo {
2
offset: Long!
3
limit: Int!
4
count: Long!
5
hasPrevious: Boolean!
6
hasNext: Boolean!
7
firstOffset: Long!
8
previousOffset: Long!
9
nextOffset: Long!
10
lastOffset: Long!
11
firstItemIndex: Long!
12
lastItemIndex: Long!
13
pageIndex: Long!
14
pageCount: Long!
15
hasPages: Boolean!
16
now: Long!
17
}

Fields

offset ● Long! non-null scalar common

The offset of the current page in the overall query results.

limit ● Int! non-null scalar common

The maximum number of results to fetch in a single query.

count ● Long! non-null scalar common

The total number of results available in the query.

hasPrevious ● Boolean! non-null scalar common

True if there is a previous page of results, false otherwise.

hasNext ● Boolean! non-null scalar common

True if there is a next page of results, false otherwise.

firstOffset ● Long! non-null scalar common

The offset for the first page of results. This is always zero.

previousOffset ● Long! non-null scalar common

The offset for the previous page of results. If there is no previous page, then zero is returned.

nextOffset ● Long! non-null scalar common

The offset for the next page of results.

lastOffset ● Long! non-null scalar common

The offset for the last page of results.

firstItemIndex ● Long! non-null scalar common

The 1-based offset of the first item on the current page.

lastItemIndex ● Long! non-null scalar common

The 1-based offset of the last item on the current page.

pageIndex ● Long! non-null scalar common

The current page number within this result set.

pageCount ● Long! non-null scalar common

The total number of pages available in the query.

hasPages ● Boolean! non-null scalar common

True if there are any pages with results, false otherwise.

now ● Long! non-null scalar common

Gets the current database time. This value can be used as input to save mutations via the lastRead argument as a safeguard against accidentally overwriting data with stale content.

Member Of