Cursor based pagination

I was going through the apollo docs for cursor based pagination and I assumed that these fields were given to us:

   edges {
        node {
          author
          text
        }
      }
      pageInfo {
        endCursor
        hasNextPage
      }

That is because there is no exact mention on the page that this has to be created separately in the backend. However, it makes sense. Does apollo at least provide an example showing how this would work? It isn’t exactly intuitive.

1 Like

Thanks for calling this out @redderick2. This style of cursor/connection based pagination was made popular in the GraphQL space by Relay, and is outlined in their GraphQL Cursor Connections Specification doc. We mention this a bit further down in the docs, but we could be more clear about this overall so we’ll get things adjusted.

Thank you. I’d love to see an example, even if it is using prefilled data, it would make a night and day difference. So far I love everything the apollo community is doing and thank you guys for making such a great service.

1 Like

Thanks @redderick2, great suggestion (cc @StephenBarlow).