Skip to content

Pagination cursor initial value has next page #1201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

micko189
Copy link

The current implementation lacks full support for cursor pagination in QueryQL (GraphQL). Issues include the inability to set an initial cursor value for the first query, broken logic preventing cursor field replacement, and flawed exit criteria that ignore the "has next page" condition, potentially causing infinite loops by only checking if the cursor is an empty string.

Pagination Cursor for QueryQL:

  • Added support for setting an initial cursor value.
  • Implemented functionality for retrieving the has next page.
  • Introduced a mechanism to handle iteration exit.

The GraphQL cursor pagination documentation:
https://graphql.org/learn/pagination/#pagination-and-edges

@micko189 micko189 requested a review from a team as a code owner March 27, 2025 08:45
@CLAassistant
Copy link

CLAassistant commented Mar 27, 2025

CLA assistant check
All committers have signed the CLA.

@micko189
Copy link
Author

Pagination

@yesoreyeram
Copy link
Collaborator

Hiya. Sorry for the delay reviewing this. Thank you for the valuable contibution. We are looking into this.

Note: We are looking for a generic stop condition implementation that works for all the pagination types. So the review may take bit longer.

@yesoreyeram yesoreyeram self-assigned this May 1, 2025
@micko189
Copy link
Author

micko189 commented May 7, 2025

Hiya. Sorry for the delay reviewing this. Thank you for the valuable contibution. We are looking into this.

Note: We are looking for a generic stop condition implementation that works for all the pagination types. So the review may take bit longer.

So when the generic implementation can be expected? I know this is in beta, but it is really handy to have this work properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

5 participants