Note: for support questions, please use stackoverflow. This repository's issues are reserved for feature requests and bug reports.
What is the current behavior?
Since 3.2.1 , we must patch every django.Model that don't implement Meta.ordering.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
a github repo, https://repl.it or similar (you can use this template as a starting point: https://repl.it/@jkimbo/Graphene-Django-Example).
class Event(models.Model):
class Meta:
ordering = None
What is the expected behavior?
Aa a patch, a retro compatible version ;
More way to implement relay ordering ;
Warnings or deprecation warnings for relay queries where ordering is not implemented.
What is the motivation / use case for changing the behavior?
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.
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.
What is the expected behavior?
Aa a patch, a retro compatible version ;
More way to implement relay ordering ;
Warnings or deprecation warnings for relay queries where ordering is not implemented.
What is the motivation / use case for changing the behavior?
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).
Please tell us about your environment:
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow)
It will be usefull and safer to have more options to configure it :
GRAPHENE["RELAY_DEFAULT_ORDERING_FIELD"]=["pk"]
DjangoObjectType.Meta.ordering=["pk"]
)Regards,