Skip to main content
Answer

Backwards Pagination not supported

  • July 18, 2023
  • 3 replies
  • 63 views

Since the backwards pagination is not supported and hasPreviosPage will remain false always. 

We are displaying page numbers and clicking on a number will fetch respective data. This is working fine when moving forward (next)

We need solution for moving backwards in sequence or jumping to a certain page. Please suggest...

 

Best answer by Jason Dressel

@Mohammad Imran,
Independent of support for previous in the graphQL response, could you keep a history of cursors in your client application?  This way, you can page or direct navigate using the historical cursors.

-Jason

3 replies

Forum|alt.badge.img
  • Seasoned Practitioner
  • Answer
  • July 18, 2023

@Mohammad Imran,
Independent of support for previous in the graphQL response, could you keep a history of cursors in your client application?  This way, you can page or direct navigate using the historical cursors.

-Jason


@Jason Dressel

To create history, we need to navigate forward by each page and cache nextCursor which can be later used to go previous pages. So, to create this cache do we need to go page by page or is there any way to get list of cursors?

 

-Mohammad Imran


Forum|alt.badge.img
  • Seasoned Practitioner
  • July 19, 2023

@Mohammad Imran,

Getting a list of cursors is not currently supported.  So, yes, you’d need to go forward and cache each in order to back.

-Jason