# Pagination

> Relay-style forward pagination with first/after and global object identity.

Product: Clad API
Source: https://docs.useclad.ai/api/pagination

---

List fields follow the Relay connection spec and paginate **forward only** with
`first` + `after`:

```graphql
query Page($after: String) {
  issues(first: 50, after: $after) {
    edges { cursor node { id ticketNumber } }
    pageInfo { hasNextPage endCursor }
  }
}
```

Loop until `pageInfo.hasNextPage` is `false`, passing the previous
`pageInfo.endCursor` as the next `after`. Cursors are opaque — do not construct
or parse them yourself.

### Global object identity

Every major object implements the `Node` interface with a globally unique
opaque `id`. Refetch any object by id with `node`, or up to 50 at once with
`nodes`:

```graphql
query { node(id: "<opaque-id>") { id } }
```
