-
Notifications
You must be signed in to change notification settings - Fork 29
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
pageInfo.hasPreviousPage always false when forward-paginating #22
Labels
bug
Something isn't working
Comments
That does look like a bug! Care to investigate a bit closer and send a PR? |
Sure, I'll have a look at it this evening |
Merged
It has taken a bit longer, but hopefully the result is worth the wait. |
Up |
The official package GraphQL.Relay hasn't been published since #24 was merged, so it looks to me like it's been fixed but not released. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using forward pagination (first+after),
pageInfo.hasPreviousPage
always returnsfalse
.The logic for calculating
hasNextPage
/hasPreviousPage
is found inrelay/src/GraphQL.Relay/Types/ArraySliceMetrics.cs
Lines 47 to 75 in 4a1f935
Is this behavior intentional? Consider this query:
I would expect
hasPreviousPage
to be true IFFsomething(last:X before:startCursor)
returns any results. However, it's alwaysfalse
.The same goes for
hasNextPage
during backwards pagination, of course.The text was updated successfully, but these errors were encountered: