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

spec divergence in "hasPreviousPage"? #35

Closed
vivekdhayaal opened this issue Dec 14, 2018 · 4 comments
Closed

spec divergence in "hasPreviousPage"? #35

vivekdhayaal opened this issue Dec 14, 2018 · 4 comments

Comments

@vivekdhayaal
Copy link

as per the spec:
https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo
"hasPreviousPage ...
If the client is paginating with first/after, then the client may return true if edges prior to after exist, if it can do so efficiently, otherwise may return false."

as per the implementation:
https://github.com/sangria-graphql/sangria-relay/blob/1854afd/src/main/scala/sangria/relay/Connection.scala#L120
"hasPreviousPage" is always false when the "last" argument is not specified. When we are paginating with "first/after", we don't specify "last", so "hasPreviousPage" is always false. It never returns true.

Can this issue be fixed to return "true" when edges prior to "after" exist?

@vivekdhayaal
Copy link
Author

@OlegIlyenko would you be able to help with this?

@anddoutoi
Copy link

@OlegIlyenko sorry to at you like this but do you or any other maintainer have any input on this? Can we expect this to be fixed?

@yanns
Copy link
Contributor

yanns commented Oct 11, 2022

@vivekdhayaal @anddoutoi I personally don't use this library.
But I can provide you support if you want to open a PR.

@yanns
Copy link
Contributor

yanns commented Apr 25, 2023

fix by #225

@yanns yanns closed this as completed Apr 25, 2023
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

3 participants