TotalCount for Cursor Pagination #43045
Unanswered
leonardocustodio
asked this question in
Ideas
Replies: 2 comments 2 replies
-
I've sent a PR for this if you guys find suitable: #43046 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Added some thoughts here TL;DR - cursor pagination is used for other reasons than scaling. It solves issues relating to synchronizing client-side paginated data. Having a count could be useful in that scenario. It would have to be turned off by default, as most will turn to cursor pagination for large datasets. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
One very common scenario for using cursor pagination for APIs nowadays is to implement GraphQL connections: https://relay.dev/graphql/connections.htm - there is a spec for this and unfortunately, the only thing that we cannot do to implement this spec when using the "cursorPaginate" is returning the totalCount.
I would like to ask if it would be possible to add this parameter or if the only way to go would be to make two different queries.
Best regards,
Leonardo
Beta Was this translation helpful? Give feedback.
All reactions