sangria-relay
sangria-relay copied to clipboard
spec divergence in "hasPreviousPage"?
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?
@OlegIlyenko would you be able to help with this?
@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?
@vivekdhayaal @anddoutoi I personally don't use this library. But I can provide you support if you want to open a PR.
fix by https://github.com/sangria-graphql/sangria-relay/pull/225