We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
spring-graphql/spring-graphql/src/main/java/org/springframework/graphql/server/webmvc/GraphQlWebSocketHandler.java
Lines 325 to 335 in 29ee6aa
ExecutionResult#getErrors can contain errors but it's never checked. My annotated handlers are not invoked.
ExecutionResult#getErrors
I work around this by directly reading the data as Flux:
data
Flux
@Bean fun requestErrorLogger() = WebGraphQlInterceptor { request: WebGraphQlRequest, chain: WebGraphQlInterceptor.Chain -> chain.next(request).map { response -> if (response.getData<Any?>() is Publisher<*>) { return@map response.transform { it.data( Flux.from(response.getData<Publisher<ExecutionResult>>()!!) .doOnNext { result -> result.errors.forEach { error -> log.error(...) } } ) } } ...
I assume basically any error that can happen will be missed but if you want a specific case, I had this graphql.TypeMismatchError.
graphql.TypeMismatchError
That error came from graphq-java when some resolver failed and the execution result/context contained errors here: https://github.com/graphql-java/graphql-java/blob/master/src/main/java/graphql/execution/SubscriptionExecutionStrategy.java#L165
The text was updated successfully, but these errors were encountered:
No branches or pull requests
spring-graphql/spring-graphql/src/main/java/org/springframework/graphql/server/webmvc/GraphQlWebSocketHandler.java
Lines 325 to 335 in 29ee6aa
ExecutionResult#getErrors
can contain errors but it's never checked. My annotated handlers are not invoked.I work around this by directly reading the
data
asFlux
:I assume basically any error that can happen will be missed but if you want a specific case, I had this
graphql.TypeMismatchError
.That error came from graphq-java when some resolver failed and the execution result/context contained errors here: https://github.com/graphql-java/graphql-java/blob/master/src/main/java/graphql/execution/SubscriptionExecutionStrategy.java#L165
The text was updated successfully, but these errors were encountered: