-
I m trying to create a custom context as given below:
} I am getting this error For this line I need to pass fields from parent to child data fetcher. In older version of graphql-java, we could use env.getExecutionContext().getVariables().put("source,FAST_STORE) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You need to provide a custom context builder if you want to be able to use a custom context. See this sample how you can provide a custom context builder: https://github.com/graphql-java-kickstart/samples/blob/master/request-scoped-dataloader/src/main/java/graphql/servlet/examples/dataloader/requestscope/CustomGraphQLContextBuilder.java. |
Beta Was this translation helpful? Give feedback.
You need to provide a custom context builder if you want to be able to use a custom context. See this sample how you can provide a custom context builder: https://github.com/graphql-java-kickstart/samples/blob/master/request-scoped-dataloader/src/main/java/graphql/servlet/examples/dataloader/requestscope/CustomGraphQLContextBuilder.java.