It’s clear how to paginate through top level results using GraphQL. For example, if I get a list of orders like this using Shopify’s GraphiQL explorer:
{
orders(first: 10) {
pageInfo {
hasNextPage
}
edges {
cursor
node {
id
lineItems(first:5) {
pageInfo {
hasNextPage
}
edges {
cursor
node {
id
}
}
}
}
}
}
I can paginate to the next page of orders like this:
{
orders(first: 10, after:
But, it is unclear how to get the line items that are nested inside the result because there's not a "lineItem" resource I can see in the GraphQL API documentation. How do I fetch more line items inside an order given a cursor? More generally, how to fetch more results from a nested resource?