Skip to content
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
morrowyn opened this issue Jun 18, 2020 · 0 comments · Fixed by #482
Labels
Milestone

Comments

@morrowyn
Copy link

morrowyn commented Jun 18, 2020

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"
@morrowyn morrowyn added the bug label Jun 18, 2020
bsara added a commit to bsara/graphql-spring-boot that referenced this issue Nov 17, 2020
bsara added a commit to bsara/graphql-spring-boot that referenced this issue Nov 17, 2020
…l so that it can be referenced by dependent projects - fixes graphql-java-kickstart#426
@oliemansm oliemansm added this to the 8.1.0 milestone Nov 17, 2020
oliemansm added a commit that referenced this issue Nov 17, 2020
[fixes #426] made GraphQLSpringServerWebExchangeContext public
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants