PageInfo

PageInfo Type

Information about pagination in a connection, following the Relay Cursor Connections Specification.

Fields

Field
Type
Description

hasNextPage

Boolean!

Indicates whether more edges exist following the set defined by the current page

hasPreviousPage

Boolean!

Indicates whether more edges exist prior to the set defined by the current page

startCursor

Cursor

The cursor corresponding to the first edge in the current page

endCursor

Cursor

The cursor corresponding to the last edge in the current page

Usage Example

query {
  attachments(first: 10) {
    edges {
      node {
        id
        filename
      }
    }
    pageInfo {
      hasNextPage
      endCursor
      hasPreviousPage
      startCursor
    }
    totalCount
  }
}

When hasNextPage is true, you can fetch the next page using the endCursor:

Last updated

Was this helpful?