-
Notifications
You must be signed in to change notification settings - Fork 765
Closed
Labels
Description
Graphene Django's documentation on ordering exposes the orderBy
filter:
query {
group(id: "xxx") {
users(orderBy: "-created_at") {
createdAt
}
}
}
Since the created_at
Django field is actually exposed in GraphQL as createdAt
,
shouldn't the ordering filter follow a consistent style by default?
query {
group(id: "xxx") {
users(orderBy: "-createdAt") {
createdAt
}
}
}
The workaround I've found is to do:
order_by = OrderingFilter(
fields = (
('created_at', 'createdAt')
)
)
but the casing conversion probably be handled by the framework itself, to avoid the unnecessary noise / maintenance bloat.
zbyte64, team-jaitq and ethagnawl