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
Multiple mutations #27
Comments
Graphql always requires a single root for all queries and a single root for all mutations. https://graphql.org/learn/schema/#the-query-and-mutation-types Perhaps my example is misleading since it is named MutatePosts? Feel free to issue a PR if you want to change the documentation. Thanks, |
Hello again Brian, Again I'm doing graphql and I still like the functionality that has been implemented, but I have a doubt and I hope you can help me. I have tried to return custom errors, but these are not shown in the response json. The maximum I have achieved is "Internal Server Error (s) while executing query". Is there any way to handle errors with your library? This is my project if you want to see that I am always willing to improve. https://github.com/dberna2/graphql-example-apigen Thank you. |
@dberna2 do you have an example of your attempt at a custom error? Did you try following the instructions here? https://www.howtographql.com/graphql-java/7-error-handling/ In particular the bit about defining the ExecutionStrategy#handleDataFetchingException method? Note that graphql-apigen simply generates POJO interfaces that make it easy to use graphql-java, so anything defined in graphql-java should work. |
@brimworks Seeing the example of the class GraphQLServlet see that it is has a queryRoot and a mutation such as MutatePosts, but for example, if you need have many mutations such as MutatePosts and "MutateAuthor", I see that it does not support it, is there any way to implement various mutations at the same time?
advance thanks and excellent help your contribution
👍
The text was updated successfully, but these errors were encountered: