You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried to add maximumQueryComplexity but i've seen that it breaks with INTROSPECTION_QUERY execution and some times in mutations. Simple Queries worked fine.
Error stack:
java.lang.NullPointerException
at io.leangen.graphql.execution.complexity.ComplexityAnalyzer.collectFields(ComplexityAnalyzer.java:58)
at io.leangen.graphql.execution.complexity.ComplexityAnalysisInstrumentation.beginDataFetch(ComplexityAnalysisInstrumentation.java:50)
at graphql.execution.Execution.executeOperation(Execution.java:72)
at graphql.execution.Execution.execute(Execution.java:49)
at graphql.GraphQL.execute(GraphQL.java:222)
at io.leangen.graphql.GraphQLRuntime.execute(GraphQLRuntime.java:40)
at graphql.GraphQL.execute(GraphQL.java:187)
at graphql.GraphQL.execute(GraphQL.java:179)
...
The text was updated successfully, but these errors were encountered:
I only now realize I've never responded to this one 😶
Indeed, the current implementation is flaky (and kind of experimental) and only works for basic queries. It fails for introspection, mutations and probably subscriptions.
graphql-java introduced a new API for traversing the operation AST, so it may be helpful in refactoring this. I simply had no time to tackle ot earlier.
Either way, I aim to fix this feature prior to 1.0 release, which I will start working on as soon as 0.9.6 is out the door (this week in all likelihood).
I've tried to add maximumQueryComplexity but i've seen that it breaks with INTROSPECTION_QUERY execution and some times in mutations. Simple Queries worked fine.
code:
GraphQLRuntime.newGraphQL(schema).maximumQueryComplexity(50).queryExecutionStrategy(new BatchedExecutionStrategy()).build();
graphQL.execute(IntrospectionQuery.INTROSPECTION_QUERY);
Error stack:
java.lang.NullPointerException
at io.leangen.graphql.execution.complexity.ComplexityAnalyzer.collectFields(ComplexityAnalyzer.java:58)
at io.leangen.graphql.execution.complexity.ComplexityAnalysisInstrumentation.beginDataFetch(ComplexityAnalysisInstrumentation.java:50)
at graphql.execution.Execution.executeOperation(Execution.java:72)
at graphql.execution.Execution.execute(Execution.java:49)
at graphql.GraphQL.execute(GraphQL.java:222)
at io.leangen.graphql.GraphQLRuntime.execute(GraphQLRuntime.java:40)
at graphql.GraphQL.execute(GraphQL.java:187)
at graphql.GraphQL.execute(GraphQL.java:179)
...
The text was updated successfully, but these errors were encountered: