Open shemama2 opened 3 years ago
What's surprising me is that you mention that you're using version 11.0.0 of this library, but then the stack trace is actually showing graphql-java-15.0.jar. That can't be right, since version 11.0.0 of this library uses graphql-java 16.x. So something in your dependency tree seems to be off. If you're specifying graphql-java manually too, then remove that from your dependencies and let graphql-spring-boot-starter pull that dependency in for you to make sure you don't run into any compatibility issues.
Furthermore I'm seeing this statement is triggering the InvocationTargetException
:
graphql.annotations.dataFetchers.MethodDataFetcher.get(MethodDataFetcher.java:72)
That's not part of this library though, but that's part of https://github.com/Enigmatis/graphql-java-annotations. We don't provide support for that library itself, only for the spring boot starter.
If fixing the dependency tree mentioned above doesn't work, I'd advise you to raise an issue at https://github.com/Enigmatis/graphql-java-annotations to get support for this issue.
We are using graphql-springboot-annotation jar version 11.0.0. When we try to add custom exception handling, it is throwing InvocationTargetException. CustomException is wrapped with InvocationTargetException and responding with null message.
Jars:
CustomExceptionClass:
Added below line in Query Resolver
throw new VehicleNotFoundException("Vehicle Not Found");
Response :
ErrorStackTrace: