graphql-python / graphene-django

Build powerful, efficient, and flexible GraphQL APIs with seamless Django integration.
http://docs.graphene-python.org/projects/django/en/latest/
MIT License
4.31k stars 769 forks source link

feat!: check Django model has a default ordering when used in a Relay Connection #1495

Closed tcleonard closed 9 months ago

tcleonard commented 9 months ago

Since predictable ordering is a pre-requisite for a Relay Connection pagination to work, we should enforce it. Indeed if you don't have a consistent ordering, since the pagination is based on an offset under the hood, when requesting page 2 you wouldn't have guaranteed that it's actually the same order that was used to define page 1.