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
When the variables parameter is not being passed as part of the request, graphql-java throws the following exception. This, in particular, is a nightly version of graphql-java which makes the issue explicit (graphql-java/graphql-java#1596). Earlier versions of graphql-java (from 11 on) fail with more obscure errors.
Would it make sense to ensure the propagated variables instance is never null and rather an empty map?
graphql.AssertException: variables map can't be null
at graphql.Assert.assertNotNull(Assert.java:15)
at graphql.ExecutionInput$Builder.variables(ExecutionInput.java:215)
at io.leangen.graphql.spqr.spring.web.GraphQLExecutor.buildInput(GraphQLExecutor.java:20)
at io.leangen.graphql.spqr.spring.web.servlet.DefaultGraphQLExecutor.execute(DefaultGraphQLExecutor.java:23)
at io.leangen.graphql.spqr.spring.web.servlet.DefaultGraphQLExecutor.execute(DefaultGraphQLExecutor.java:11)
at io.leangen.graphql.spqr.spring.web.GraphQLController.executeJsonPost(GraphQLController.java:42)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
The above issue, in particular, is triggered simply loading a GraphiQL page which attempts an introspection query that doesn't include a variables field in the request.
The text was updated successfully, but these errors were encountered:
Next release of the starter where this should work correctly is due this week.
But, as a general rule, do not expect you can change the version of graphql-java and expect things to work. Every release contains breaking changes.
Using latest version 0.5.0-Snapshot with apollo-client on GraphQlController requestParams.getVariables() is not null it's an empty map so variables is not initialized with requestBody.getVariables()
When the
variables
parameter is not being passed as part of the request,graphql-java
throws the following exception. This, in particular, is a nightly version ofgraphql-java
which makes the issue explicit (graphql-java/graphql-java#1596). Earlier versions ofgraphql-java
(from 11 on) fail with more obscure errors.Would it make sense to ensure the propagated
variables
instance is never null and rather an empty map?The above issue, in particular, is triggered simply loading a GraphiQL page which attempts an introspection query that doesn't include a
variables
field in the request.The text was updated successfully, but these errors were encountered: