GraphQL API
Organization API
Organization guide

Pagination

Move through large connections with opaque cursors.

Forward pagination

Request first items and retain endCursor. On the next request, pass it asafter. Continue while hasNextPage is true.

query Orders($first: Int!, $after: String) {
  orders(first: $first, after: $after) {
    edges {
      cursor
      node { id reference }
    }
    pageInfo { hasNextPage endCursor }
  }
}

Connection arguments

firstNumber of items to fetch forward
afterReturn items after this cursor
lastNumber of items to fetch backward
beforeReturn items before this cursor
Supply first or last. The maximum page size is 250. Treat cursors as opaque strings and never construct or modify them.