art1415926535 / graphene-sqlalchemy-filter

Filters for Graphene SQLAlchemy integration
https://pypi.org/project/graphene-sqlalchemy-filter/
MIT License
118 stars 34 forks source link

Intercept nested queries to add default filters #65

Open fernandoflorez opened 2 years ago

fernandoflorez commented 2 years ago

Hello,

I'm looking to add a default filter based on a context variable to nested queries.

For example, I'd like to only return active records (status = 'active') for all the data tree.

I've tried overwriting the FilterableConnectionField get_query method but it only applies to top level query and not nested.

Any guidance on how can this be done?

Thank you!