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
Add support for filterset_class meta parameter #600
Conversation
* Allow for use of either filter_fields or filterset_class * Add tests to check that the behavior is similar to filter_fields * Add documentation to show how to make use of the parameter
Is there a particular reason why we don't pass the provided filterset class through |
Nope, I just pushed a fix for that part so that it has the same behavior as passing in the FilterSet as an argument to DjangoFilterConnectionField. I think there's some important overriding behavior in the mixin to work with Relay node IDs rather than the database ID. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems reasonable to me.
Test coverage decreased because a new scenario is not tested:
|
@mvanlonden, the latest commit should have the previously requested test case (when filter_fields and filterset_class are both set), and the coverage is now up 0.2%. Let me know if you had something else in mind. |
This would enable filtering on Django relationships that create a default DjangoFilterConnectionField based on the model type and its meta parameters.