Mutations giving errors - graphQLContext[GraphQLContextKey.DGS_CONTEXT_KEY] must not be null #1725
Unanswered
tl-manishoswal
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
@congotej @srinivasankavitha - Could you please share some insights on this error which I am getting ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I upgrade from Spring Boot version 2.6.2 to version 3.0.12, Netflix DGS was upgraded to version 8.0.3 from 4.9.25 . I did fix up all the compilation issues and spring boot version upgrade issue but now stuck at last issue . Any mutation I am trying to test is giving a this below error :
{ "errors": [ { "message": "graphQLContext[GraphQLContextKey.DGS_CONTEXT_KEY] must not be null", "locations": [] } ], "data": null }When I debugged through the code I see that only in case of Mutation it is running a particular code which seems to be the problematic code. In case I try to run any query all of them are working fine
Problematic Code :
https://github.com/Netflix/dgs-framework/blob/775eadbbb867d6d3fd052a9d9a88de7111569177/graphql-dgs-spring-webmvc/src/main/kotlin/com/netflix/graphql/dgs/mvc/DgsGraphQLCSRFInstrumentation.kt#L27C11-L27C119
we try to get DGS_CONTEXT_KEY here DgsContext.from(parameters.executionContext.graphQLContext) and it throws a NPE here
Any reason how to fix this issue or set the DGS_CONTEXT_KEY
Beta Was this translation helpful? Give feedback.
All reactions