-
Notifications
You must be signed in to change notification settings - Fork 113
Custom servlet listener with graphql-spring-boot-starter #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The subject and body of your question aren't very clear and seem to be asking different things. You mention that "you just want to add custom info to the context". See #226 how to do that. |
So in graphql there is the concept of contexts, which can have any data on data, to be retrieved on any mutation or resolver. I was looking on how to do that! |
Right, so that's why I pointed you to #226 (comment). Did you take a look at that? The custom context class you define there can contain any properties you want to pass around and you can get a hold of it in resolvers by using the void myQueryMethod(int argOne, String argTwo, DataFetchingEnvironment env) {
MyCustomContext context = (MyCustomContext) env.getContext();
Thing myThing = context.getThing();
} |
Can you confirm whether this answered your question so we can close the issue? |
Closing the issue due to inactivity. |
Hello!
I'm using
graphql-spring-boot-starter
and i'm trying to add a custom sevlet to it but docs are a little missleading and i can't find the best place to put it!I just want to add custom info to the context!
How could i do it! Thank you!
The text was updated successfully, but these errors were encountered: