Open TurnrDev opened 2 years ago
After some basic exploration work, I found that we can add a check on line 167 where we check the directives and possibly don't add the field (and any children) to the SQL query if skipped.
I still need investigate is Graphene will still attempt to pull the values anyway.
Hi @TurnrDev! This would be a great addition. I'm not working anymore with python, but feel free to create a PR and will gladly review it so we can merge it.
As you said, it would be good to know if graphene knows supports the directives.
What is the possibility of adding support for skip and include directives? I found when including a field in a query but then excluding it with
@include(if: false)
, Graphene Django Optimizer still includes it in the SQL Query:An anonymized example:
This would still put excludedThing is the SQL query