Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit 33cf080

Browse files
committed
fix: unit tests after context refactor
1 parent 72f45cd commit 33cf080

File tree

1 file changed

+3
-3
lines changed
  • graphql-spring-boot-test/src/test/java/com/graphql/spring/boot/test/beans

1 file changed

+3
-3
lines changed

graphql-spring-boot-test/src/test/java/com/graphql/spring/boot/test/beans/DummyQuery.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package com.graphql.spring.boot.test.beans;
22

3-
import graphql.kickstart.servlet.context.GraphQLServletContext;
43
import graphql.kickstart.tools.GraphQLQueryResolver;
54
import graphql.schema.DataFetchingEnvironment;
65
import java.util.Optional;
6+
import javax.servlet.http.HttpServletRequest;
77
import org.springframework.stereotype.Service;
88

99
@Service
@@ -30,8 +30,8 @@ public String queryWithVariables(final String input) {
3030

3131
public String queryWithHeader(
3232
final String headerName, final DataFetchingEnvironment dataFetchingEnvironment) {
33-
return ((GraphQLServletContext) dataFetchingEnvironment.getContext())
34-
.getHttpServletRequest()
33+
return ((HttpServletRequest)
34+
dataFetchingEnvironment.getGraphQlContext().get(HttpServletRequest.class))
3535
.getHeader(headerName);
3636
}
3737
}

0 commit comments

Comments
 (0)