When a one-to-many relationship exists between two nodes, for example organization -> plans, we paginate the responses from the query. Forward, cursor based pagination is used, for more details see here.
The arguments for forward pagination are:
first a non-negative integer representing the number of results
after: the cursor of which the results will be after
The connection which is returned includes the following fields:
pageInfo: which contains the fields hasNextPage and endCursor
edges: which includes a list of edges. Each edge contains the cursor for that node and the node itself
For this example we will go through the organization link to plans.
Firstly we'll get the plans connection with the first two edges:
You can see that hasNextPage is true so we know there are more items and the endCursor is set to the last item in the response. Two fetch the next page you simply update the query to include the after parameter for the connection: