getContext alternative now that it's deprecated #627
Unanswered
sapinheiro
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm new to graphql and have been using
DataFetchingEnvironment#getContext
in my project. For example:I've built the context elsewhere using the
GraphQLServletContextBuilder
which seems to work out of the box for setting the context.The problem is that getContext is deprecated. It says to alternatively use
getGraphQLContext
, but it's currentlynull
for me. How do I get it populated with the proper value? If I need to override the ExecutionInput, where do I do that? There doesn't seem to be any clear documentation on this and everything I've seen uses getContextBeta Was this translation helpful? Give feedback.
All reactions