Challenge: Apollo Client and GraphQL Pagination
Test your understanding of GraphQL and Apollo Client and implement pagination!
We'll cover the following
Problem Statement
- Extend the
repositories
list field by querying an ordered list of repositories which is ordered by the number of stargazers - Extract the content of a repository
node
to a GraphQL a reusable fragment - Add the pagination feature for list of repositories
- Add the
pageInfo
field with itsendCursor
andhasNextPage
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 ascursor
argument.
- Add the
Get hands-on with 1400+ tech skills courses.