You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Component
public class GraphqlQLValidationErrorTransformer implements WebGraphQlInterceptor {
@Override
public Mono<WebGraphQlResponse> intercept(WebGraphQlRequest request, Chain chain) {
return chain.next(request).map(response -> response.transform(builder -> {
// do nothing
}));
}
}
but I'm getting:
java.lang.NoSuchMethodError: 'graphql.ExecutionResultImpl graphql.ExecutionResultImpl$Builder.build()'
at org.springframework.graphql.support.DefaultExecutionGraphQlResponse$Builder.build(DefaultExecutionGraphQlResponse.java:213) ~[spring-graphql-1.1.3.jar:1.1.3]
at org.springframework.graphql.server.WebGraphQlResponse.transform(WebGraphQlResponse.java:75) ~[spring-graphql-1.1.3.jar:1.1.3]
at com.core.in.graphql.GraphqlQLValidationErrorTransformer.lambda$intercept$1(GraphqlQLValidationErrorTransformer.java:15) ~[main/:na]
Because of graphql-java/graphql-java#2240 I want to customize validation error response by using transform method.
I saw this example here https://docs.spring.io/spring-graphql/docs/current/reference/html/#overview 2.4.1. WebGraphQlInterceptor
but I'm getting:
I don't understand why. I'm seeing build() method in ExecutionResultImpl.Builder() (graphql-java:20.2)
This code also works without error:
The text was updated successfully, but these errors were encountered: