IMPORTANT: Relay pagination
We use GraphQL Relay pagination in queries.
See specs:
GraphQL Cursor Connections Specification
A GraphQL server which conforms to this spec must reserve certain types and type names to support the pagination model of connections. In particular, this spec creates guidelines for the following types:
You can paginate data with the after and before arguments.
For example, if you get the initial query from Steam game data for multiple games, you can see the first 20 apps.
If endCursor returns R1BDOk46MjQyNzYw (base64’d value for GPC:N:242760), you can put that into the after argument to get the next batch of data like this:
query SteamApps {
steamApps(orderBy: {copiesSold: Desc}, after: "R1BDOk46MjQyNzYw") {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node {
id
appid
name
releaseDate
copiesSold
revenue
wishlists
}
}
}
}
You can see another example in Pagination example with multiple queries.
In endpoints using Relay pagination, you can use totalCount to get the total number of items included.
Use first or last to change the page size from the connection's default (often 20). Ordinary connections support up to 1,000 items per page. Specialized connections may use lower limits, including 100 items for demo and DLC connections; check the schema documentation for the field you are querying.