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.28k stars 766 forks source link

default ordering in minor version breaks changes and compatibility #1520

Closed alamoureux closed 3 months ago

alamoureux commented 3 months ago

Note: for support questions, please use stackoverflow. This repository's issues are reserved for feature requests and bug reports.

Since 3.2.1 , we must patch every django.Model that don't implement Meta.ordering.

class Event(models.Model):
    class Meta:
        ordering = None

Lack of retro compatibility. And to use relay, we have to modify the behaviour of all our Models. That means implementing a default ordering directly on django ORM level instead of graphene API level.

It is discouraged by django itself (https://docs.djangoproject.com/en/5.0/ref/models/options/ , see warning about Options.ordering).

It will be usefull and safer to have more options to configure it :

Regards,

kiendang commented 3 months ago

Fixed in #1518 @firaskafri could you help make a v3.2.2 release?