-
Notifications
You must be signed in to change notification settings - Fork 41
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
has_previous_page and has_next_page always False while navigating #12
Comments
Fixed by #14 - @robmoorman could you test to see if that fix works for you? |
Hi @sciyoshi regardless the fix you made, it's probably not in the relay spec at all (till today I have no clue why relay put this in the spec). See https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo.Fields |
@robmoorman I'm looking at that spec as well. For example, for
(emphasis mine) |
I just got bitten by this too. As previously quoted, the spec says (emphasis mine):
By my reading, the current behavior is technically within spec because the behavior is prescribed as "may" and not "must". That said, I suspect that like me, it's very counter-intuitive to consumers, and it cost quite a bit of time and debugging to figure out. My sense is that this specific PR would dramatically improve the greenfield developer experience, however, I can see how it would likely break existing usages, especially considering that the default value for an unspecified Is there some way this could be reworked to accommodate both cases? For instance what about an optional boolean param that indicates whether the |
This commit implements a fix for graphql-python/graphql-relay-py#12 The project `graphql-relay-py` seems unmaintained, so there is little hope that [this PR](graphql-python/graphql-relay-py#14) gets merged any time soon. Closes projectcaluma#469
This commit implements a fix for graphql-python/graphql-relay-py#12 The project `graphql-relay-py` seems unmaintained, so there is little hope that [this PR](graphql-python/graphql-relay-py#14) gets merged any time soon. Closes projectcaluma#469
This commit implements a fix for graphql-python/graphql-relay-py#12 The project `graphql-relay-py` seems unmaintained, so there is little hope that [this PR](graphql-python/graphql-relay-py#14) gets merged any time soon. Closes projectcaluma#469
While using the pageInfo
hasPreviousPage
andhasNextPage
cursor based navigation (before and after), it seems these results are always set to False.The corresponding code (https://github.com/graphql-python/graphql-relay-py/blob/master/graphql_relay/connection/arrayconnection.py#L104-L105):
Querying with
first: 5, after: "xxx"
in this case always results inhasPreviousPage: false
.The same for
last: 5, before: "xxx"
, which results always inhasNextPage: false
.The text was updated successfully, but these errors were encountered: