Closed he0119 closed 7 months ago
I found that f.name.value at L110 is camelCase value while at L63 f.name is underscore value which makes sort_key function always return 0.
f.name.value
f.name
sort_key
https://github.com/strawberry-graphql/strawberry-graphql-django/blob/c90a7907913188cb5b70ee74e3fbe4a1ead7c8a2/strawberry_django/ordering.py#L110 https://github.com/strawberry-graphql/strawberry-graphql-django/blob/c90a7907913188cb5b70ee74e3fbe4a1ead7c8a2/strawberry_django/ordering.py#L62-L65
Try to fix it by converting f.name to camelCase value, don't know if this is the right way to fix the bug (will f.name.value always be camelCase value?).
https://github.com/strawberry-graphql/strawberry-graphql-django/issues/150#issuecomment-1835527261
Description
I found that
f.name.value
at L110 is camelCase value while at L63f.name
is underscore value which makessort_key
function always return 0.https://github.com/strawberry-graphql/strawberry-graphql-django/blob/c90a7907913188cb5b70ee74e3fbe4a1ead7c8a2/strawberry_django/ordering.py#L110 https://github.com/strawberry-graphql/strawberry-graphql-django/blob/c90a7907913188cb5b70ee74e3fbe4a1ead7c8a2/strawberry_django/ordering.py#L62-L65
Try to fix it by converting
f.name
to camelCase value, don't know if this is the right way to fix the bug (willf.name.value
always be camelCase value?).Types of Changes
Issues Fixed or Closed by This PR
https://github.com/strawberry-graphql/strawberry-graphql-django/issues/150#issuecomment-1835527261
Checklist