Skip to content
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

hasMore information #70

Open
cyberbudy opened this issue Jan 20, 2025 · 1 comment
Open

hasMore information #70

cyberbudy opened this issue Jan 20, 2025 · 1 comment

Comments

@cyberbudy
Copy link

Hi, thanks for a great library

I have a question about result pagination cursor. I used to return in my API direct information whether we have more items to paginate. I see that inside Paginate there is a hasMore variable, but it doesn't returned with cursor information.
What do you think about adding it to cursor information or is there any way to undestand whether we have next page?

@pilagod
Copy link
Owner

pilagod commented Jan 21, 2025

Hi @cyberbudy, actually hasMore information is already aggregated into the cursor. When you get a nil value of after cursor, it means that there is no next page. And same for before cursor but in different direction, nil means no previous page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants