Working with lists
List fields use Relay-style connections. They return edges, node, and pageInfo so integrations can process large result sets in smaller pages.
query ProductsAfterCursor($after: String) {
products(first: 50, after: $after) {
edges {
cursor
node {
id
productNumber
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
Pagination
Pass first to choose the page size: at least 1 and at most 500, 10 when you leave it out. If pageInfo.hasNextPage is true, pass pageInfo.endCursor as after in the next request.
Order
Lists have no sort argument; every list returns its records in a fixed order. Most lists return the newest records first, ordered by creation date. Some lists use an order that fits their records better, for example warehouses and suppliers by name, bin locations by code, and batches by number.
Filters
Most list fields expose a type-specific filter input. Filters can be combined with AND, OR, and NOT.
query ProductBySku($sku: String!) {
products(filter: { productNumber: { equals: $sku } }) {
edges {
node {
id
productNumber
name
}
}
}
}
The operators depend on the type of the field:
| Field type | Operators |
|---|---|
| ID | equals, in, notIn |
| String | equals, in, contains, startsWith, endsWith, isNull |
| Int, Float | equals, in, lt, lte, gt, gte, isNull |
| DateTime | equals, before, after, isNull |
| Boolean | equals |
| Enum | equals, in, isNull |
A filter is rejected with a BAD_REQUEST error when it exceeds one of these limits:
AND,OR, andNOTcan be nested at most 5 levels deep.- A filter can contain at most 50 conditions; every operator such as
equalsorincounts as one. inandnotIntake at most 100 values, and at least one. If a filter's value list can end up empty (for example when it is built from an earlier query's results), skip the request instead of sending an empty list.
Synchronization
For recurring synchronization jobs:
- Keep a checkpoint on
updatedAtwhere the type exposes it: filter withupdatedAt: { after: $lastSync }and page through the results with the cursor. A stored cursor alone misses records created later, because most lists return the newest records first. - Request only the fields the job needs.
- Retry failed pages idempotently instead of restarting a whole export when possible.