Skip to Content

OrderConnection

A connection to a list of Order items.

Connection Structure

type OrderConnection { edges: [OrderEdge] nodes: [Order] pageInfo: PageInfo! totalCount: Int }

Pagination Arguments

ArgumentTypeDescription
firstIntReturns the first n items from the list
lastIntReturns the last n items from the list
afterStringReturns items after the specified cursor
beforeStringReturns items before the specified cursor

PageInfo Structure

The pageInfo object contains pagination metadata about the connection:

  • hasNextPage (Boolean!): Whether there are more items after the current page
  • hasPreviousPage (Boolean!): Whether there are more items before the current page
  • startCursor (String): The cursor of the first item in the current page
  • endCursor (String): The cursor of the last item in the current page

Example

query { orders(first: 10, after: "eyJpZCI6IjEwMDEifQ==") { edges { cursor node { id } } nodes { id } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } totalCount } }

Edge Type

The OrderEdge type represents a single item in the connection. Each edge contains:

  • cursor (String!): An opaque string used for pagination to identify the position of this item
  • node (Order): The actual Order object containing the item’s data