Pagination
List queries in the Vasco GraphQL API usually return a Connection object instead of a raw array. This follows the common GraphQL connection pattern and makes large result sets easier to browse page by page.
Connection structure
A paginated response generally contains:
| Field | Description |
|---|---|
edges | The list wrapper. Each edge contains one result and its pagination cursor. |
node | The actual business object returned by the query. |
cursor | An opaque position marker attached to an edge. |
pageInfo | Metadata about the current page, such as hasNextPage and hasPreviousPage. |
totalCount | The total number of matching items, when exposed by the connection. |
Requesting a page
Most Vasco list queries use resultsPerPage and page arguments. Start with page: 1 and keep resultsPerPage to a reasonable value for your use case.
query ListAccounts {
GetAccounts(
resultsPerPage: 20
page: 1
) {
totalCount
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
cursor
node {
id
label
}
}
}
}
Some operations expose query-specific arguments such as start and end. Check the API Reference for the exact arguments supported by each list query.
Best practices
- Request only the fields your screen or integration needs inside
node. - Avoid very large pages; prefer loading the next page when needed.
- Use
totalCountfor counters and page controls when it is available. - Use
pageInfoto know whether another page exists. - Treat cursors as opaque values: do not parse or build them yourself.
For more background on GraphQL pagination patterns, see the official GraphQL pagination guide.