Replies: 1 comment
-
Another thing that might be great is moving some of this logic into class methods instead of global methods. This way one can customize some of the logic to their own liking |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So a pretty important use case at my company is the ability to add custom filters that aren't field specific
Here is an example use case (I am using my "hack" which I discuss later)
Step 1. Update BaseTypeFilter class to allow for "filter" as a _meta field. We get all the custom filter functions from the classes that extend GrapheneSQLAlchemyFilter. We ensure those functions contain the correct variables. and then add the fields to the filter fields list.
Then override the execute_filters method. We have it accept a "resolve_info" or "info" so that we can pass those to the custom filter functions
Update SQLAlchemy base to accept a "filter" field
Beta Was this translation helpful? Give feedback.
All reactions