-
Notifications
You must be signed in to change notification settings - Fork 770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to use camelCase in orderBy
field
#1491
Comments
orderBy
fieldorderBy
field
orderBy
fieldorderBy
field
Looks like this is indeed expected behavior, based on previously merged PRs addressing this in the past |
From a quick look there doesn't seem to be a quick fix for this. fuel_type = JSONField(..., db_column="fuelType") |
In my case, I believe this won't work as the key Any ideas in regards to bypassing the Alternatively, it'd be nice if we could provide an optional override somehow to prevent this kind of behavior for codebases that have data that expect to perfor an order_by using a value in camelCase, possibly as a kwarg somewhere? |
Note: for support questions, please use stackoverflow. This repository's issues are reserved for feature requests and bug reports.
I execute a query with these arguments:
and
fuelType
(which isfuelType
as a JSON column in a Django DB)gets converted to
fuel_type
before it reaches django's ORM.The culprit is here:
/usr/local/lib/python3.11/site-packages/graphene_django/filter/fields.py (line: 99) resolve_queryset()
On the version of graphene_django that I'm currently using (3.2.0).
a github repo, https://repl.it or similar (you can use this template as a starting point: https://repl.it/@jkimbo/Graphene-Django-Example).
execute a query where
orderBy
has a value that is incamelCase
What is the expected behavior?
I'd expect the naming convention not to cause such weird sorting behavior. (Or, at the least, give me an error telling me what is wrong and why I cannot use
camelCase
)What is the motivation / use case for changing the behavior?
Please either add errors or fix the bug
Please tell us about your environment:
graphene-django = "==3.2.0"
The text was updated successfully, but these errors were encountered: