-
Notifications
You must be signed in to change notification settings - Fork 768
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
Fix backward Relay pagination #1046
Fix backward Relay pagination #1046
Conversation
Not sure what is causing those test failures... it fails in an import in django rest framework (and the import is totally valid). |
This is the relevant part I see from the test failure:
DRF wants to import a validator from Django that doesn't exist in Django 1.11 |
Indeed, which is not related to anything I have changed... Maybe DRF simply decided to drop support for older versions of Django and we might need to do the same here. |
@tcleonard yep DRF dropped support for Django 1.11. Fixed the tests here: #1047 |
thanks @jkimbo, merged your changes and the CI now passes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this
@zbyte64 is there anything that needs to be done to get this in? |
I don't think so... for me it's ready to merge.. 🤷 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me. Just one change I'd suggest.
|
||
def test_should_query_with_low_max_limit(self, graphene_settings): | ||
""" | ||
When doing backward pagination (using last) in combination with a max limit higher than the number of objects |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, max limit is lower than the number of objects, right?
It looks like this test covers the same case as this one, which is great!
@jkimbo any chance we could get this merged? Because graphene-django doesn't support true cursor pagination, the most reliable way to get recent items first is to go backwards, and this bug gets in the way of that. |
Thanks @zbyte64 |
1 similar comment
Thanks @zbyte64 |
New version of the pull request #1010 (to solve issue #1009) which adds unit tests.