Graphql-dotnet: Error - Query is too complex to validate.

Created on 15 Jun 2018  路  4Comments  路  Source: graphql-dotnet/graphql-dotnet

I am getting following error, when query is too complex. But then we keep getting error for every subsequent query, irrespective of the complexity of the query. error goes off once I restart node on Azure Service Fabric.

image

There are 2 methods in class "GraphQL.Validation.Complexity.ComplexityAnalyzer", namely "FragmentIterator" and "TreeIterator" that has following code.

image

I assume, _loopCounter should be reset to 0 before throwing error. It is done when everything works alright, but not in case if validation fails.

GraphQL version used : 2.0.0-alpha-924

bug

All 4 comments

Thanks for the report - mind submitting a PR with a fix?

Sure will do it over the weekend.

Thanks.

@dharmeshtailor @joemcbride it could be closed since #699 was merged.

Thanks, Sorry was busy over the weekend. So didn't get chance to submit the PR.

Closing the issue.

Was this page helpful?
0 / 5 - 0 ratings