Open Tomschuh opened 1 month ago
Hey @Tomschuh ,
I just tried reproducing the issue here and wasn't able to.
Could you provide a reproducible example?
Also, if when providing a reproducible example you find a way to solve it, like in your suggestion, feel free to open a PR for that :)
When values are passed not in the query but using variables, then strawberry-django isn't able to resolve the ordering sequence. It probably happens only if you create a custom order method using
@strawberry_django.order_field
annotation.Example
Query example:
variables example:
Causes
The result is that the query fails with the following assert:
My humble solution
I am not saying that my solution is right, but maybe it will help someone to get on the right track. I extended the original method a little bit and used it in the custom
order
method:then in order class:
System Information
strawberry-graphql==0.227.2 strawberry-graphql-django~=0.39.2
Additional Context
If it doesn't make sense, feel free to delete the issue.
Upvote & Fund