-
Notifications
You must be signed in to change notification settings - Fork 113
GraphQLJavaServlet #99
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
I see |
You have to use the builder now to construct a private SimpleGraphQLHttpServlet createServlet(GraphQLSchema schema) {
GraphQLSchemaProvider schemaProvider = new DefaultGraphQLSchemaProvider(schema);
GraphQLInvocationInputFactory invocationInputFactory = GraphQLInvocationInputFactory.newBuilder(schemaProvider).build();
return SimpleGraphQLHttpServlet.newBuilder(invocationInputFactory).build();
} @alamothe To be able to use it in a servlet container you probably need #60 which is yet to be implemented. |
Thanks! |
@oliemansm It only needs constructor to be protected (it was in 5.0.1) I don't understand why this is such a huge issue. I'm sticking with 5.0.1 for now |
@alamothe Who's saying it's a huge issue? Made it protected again. |
@oliemansm My apologies, I wrongly assumed it was made private again on purpose and there's a reason to keep it that way. Thanks for doing this! |
Sure, no problem. Not sure if this one will be part of 5.0.3 or the release after that. Depends on if the 5.0.3 release was already in the pipeline at Sonatype. |
@oliemansm is there I way you can do things like append a cookie to the response or create a custom error handling strategy with this createServlet method example you showed? That's what I'm struggling with. I used to extend SimpleGraphQLServlet's methods like createContext and getGraphQLErrorHandler, but now its not clear to me how that works with a GraphQLInvocationInputFactory. The documentation here on github is out of date (it still refers to SimpleGraphQLServlet). |
The |
What is the replacement for SimpleGraphQLServlet (along with the required parameters to the constructor) in the latest release?
The text was updated successfully, but these errors were encountered: