Pagination

In Skutally GraphQL, all responses are paginated by default.

In your queries, use the first argument to specify the page size, such as first: 10 which will return the first 10 objects. You will also need the cursor to the request the next page of objects.

For example:

Query
Response
Query
query {
someObject(first: 5) {
pageInfo {
endCursor
startCursor
hasPreviousPage
hasNextPage
}
edges {
node {
id
}
}
}
}
Response
{
"data": {
"someObject": {
"pageInfo": {
"endCursor": "Aa==",
"startCursor": "Bb==",
"hasPreviousPage": false,
"hasNextPage": true
},
"edges": [
{
"node": {
"id": "0000001"
}
},
...
]
}
}
}

And, to request the next 5 objects, use the startCursor in your query argument.

For example:

Request
Response
Request
query {
someObject(first: 5, after: "<START_CURSOR>") {
pageInfo {
endCursor
startCursor
hasPreviousPage
hasNextPage
}
edges {
node {
id
}
}
}
}
Response
{
"data": {
"someObject": {
"pageInfo": {
"endCursor": "Bb==",
"startCursor": "Cc==",
"hasPreviousPage": true,
"hasNextPage": false
},
"edges": [
{
"node": {
"id": "0000006"
}
},
...
]
}
}
}