Closed devkral closed 6 months ago
maybe f.name isn't required at all (but useful for sorted results) as well as reverse (note: in this case the suggested code must be changed to f.name in ...)
@devkral ohh thank you for raising that issue.
The changes was done in this PR to fix https://github.com/strawberry-graphql/strawberry-graphql-django/issues/422
Apparently you have made some changes that should fix your issue while not regressing on that fix. Would you like to open a PR with that? I'll try to review it ASAP!
my queries which use OR and AND doesn't work anymore. I think the sorting breaks stuff, you may need to convert the key lambda to
lambda f: (f.name not in {"OR", "AND", "NOT"}, f.name)
but I didn't investigated the bug in detail.
Note: I use strawberry_django.filters.apply manually
Edit: fix the code suggestion (was inverted)
Upvote & Fund