Closed kiendang closed 4 months ago
@kiendang It looks like you're getting stuck at the same place I did - there doesn't seem to be an easy way to define ordering in a Meta class somewhere. The only ordering method I could find in the docs was using an OrderingFilter, but setting a default with that doesn't look easily viable. I would suggest opening another feature issue to implement default ordering so this PR can be wrapped up :)
@gsvr my problem is that I don't know if setting
class Meta
ordering = ["pk"]
actually does anything because I can't seem to find any code that references ordering
in this or Graphene code base.
If that is the case, we should just revert #1495.
In case that ordering
actually works, setting a default ordering
is doable, but even in this case I'm fine with reverting #1495 first then implementing that later.
@kiendang Yeah, I also searched around, and I don't think setting ordering in class Meta actually does anything. I couldn't find any usage of that in the docs or the code.
I'm working on fixing #1516, probably by setting
ordering = ["pk"]
by default inDjangoConnectionField
class Meta
.However I don't find any reference of
ordering
in both this or Graphene's code base. Does anyone have any idea? Or is settingordering
actually not doing anything? @sjdemartini @tcleonard