This repository was archived by the owner on Dec 19, 2023. It is now read-only.
This repository was archived by the owner on Dec 19, 2023. It is now read-only.
Can't cast to dataFetchingEnvironment.getContext() to graphql.kickstart.spring.GraphQLSpringServerWebExchangeContext #426
Closed
Description
I need to access the ServerHttpRequest
in order to obtain the provided token, so I can pass this on to the Spring WebFlux WebClient
but I can't cast the dataFetchingEnvironment.getContext()
to graphql.kickstart.spring.GraphQLSpringServerWebExchangeContext
But when I do dataFetchingEnvironment.getContext().getClass()
it says the context is of graphql.kickstart.spring.GraphQLSpringServerWebExchangeContext
Any idea how I can do this within Spring WebFlux?
Build.gradle:
implementation "com.graphql-java-kickstart:graphql-kickstart-spring-boot-starter-tools:7.0.2-SNAPSHOT"
implementation "com.graphql-java-kickstart:graphql-kickstart-spring-boot-starter-webflux:7.0.2-SNAPSHOT"