strawberry-django
strawberry-django copied to clipboard
Pass field lookups to the custom filter method
Feature Request Type
- [ ] Core functionality
- [X] Alteration (enhancement/optimization) of existing feature(s)
- [ ] New behavior
Description
When a filter includes another nested filter with custom methods, it is impossible to get to the lookup and use it for filtering.
Essentially, custom filtering methods can be used within a specific filter, but cannot be used if the filter is nested. In this case, you have to build workarounds based on the type of queriset model, which is quite unpleasant
The simplest solution seems to be passing the lookup as a method argument.
Upvote & Fund
- We're using Polar.sh so you can upvote and help fund this issue.
- We receive the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.
This is one of the issues being discussed in https://github.com/strawberry-graphql/strawberry-graphql-django/issues/399 and how to improve that API
Fixed by https://github.com/strawberry-graphql/strawberry-django/pull/478