Challenge: Apollo Client and GraphQL Pagination

Test your understanding of GraphQL and Apollo Client and implement pagination!

We'll cover the following

Problem Statement

  1. Extend the repositories list field by querying an ordered list of repositories which is ordered by the number of stargazers
  2. Extract the content of a repository node to a GraphQL a reusable fragment
  3. Add the pagination feature for list of repositories
    • Add the pageInfo field with its endCursor and hasNextPage fields in the query
    • Add the after argument and introduce a new $cursor variable for it
    • Perform the first query without a cursor argument
    • Perform a second query with the endCursor of the previous query result as cursor argument.

Get hands-on with 1200+ tech skills courses.