Paginate data

At Wino, we use cursor-based pagination. This feature follows the Relay specification and explanations can be found here: Pagination and edges.

Examples#

Ask for the next two in the list StockActivity:

query {
stockActivities(first: 2) {
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
edges {
cursor
node {
id
}
}
}
}

Ask for the next two after the last stock activity we fetched:

query {
stockActivities(first: 2, after: $endCursor) {
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
edges {
cursor
node {
id
}
}
}
}