Extending GraphQL Connections with additional Fields and Arguments

InstructorNik Graf

Share this video with your friends

Send Tweet

A Connection can be extended in multiple ways:

  • Fields representing meta information on a entity relationship can be added
  • PageInfo itself can be enhanced
  • Arguments for filtering or ordering can be applied

In this lesson we walk through all of them to demonstrate the flexibility of the Connection Specification.

Ron
Ron
~ 4 years ago

Hi Nic, thanks for the course, I really enjoyed.

One question, how to display the page number in the pagination bar, like 3,4,5,6,7,8? I found there is no way we can get the information from.

Thanks, Ron

Nik Graf
Nik Graf(instructor)
~ 4 years ago

Hey Ron, you are correct! On top of my mind I probably would extend the PageInfo with another field: currentPageNumber.

Then you either can:

  1. Calculate the other page numbers
  2. Extend PaginationEntry with the field pageNumber

I hope that helps