Skip to content

fix(graphql): nextPage and prevPage are non nullable even though they can be null sometimes #12201

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

r1tsuu
Copy link
Member

@r1tsuu r1tsuu commented Apr 23, 2025

This PR introduced #11952 improvement for graphql schema with making fields of the Paginated<T> interface non-nullable.

However, there are a few special ones - nextPage and prevPage. They can be null when:
The result returned 0 docs.
The result returned x docs, but in the DB we don't have x+1 doc. Thus, nextPage will be null. The result will have nextPage: null. Finally, when we query 1st page, prevPage is null as well.

image

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

Successfully merging this pull request may close these issues.

1 participant