graphql-php
graphql-php copied to clipboard
Ignore Introspection queries in QueryComplexity rule
Followup from https://github.com/webonyx/graphql-php/discussions/1203
The QueryComplexity rule should ignore introspection query. This way you can set the max query complexity very low and still allow introspections to happen.
Introspection has a complexity of around 181.
In regards to https://github.com/webonyx/graphql-php/issues/1207 i guess i would also like to calculate the introspection queries as they can produce a significant load.
Maybe we can implement this feature here in that way, that we have the option enable/disable the exclude.
Thanks!