Search in sources :

Example 1 with TypeMismatchError

use of graphql.TypeMismatchError in project graphql-java by graphql-java.

the class ExecutionStrategy method handleTypeMismatchProblem.

private void handleTypeMismatchProblem(ExecutionContext context, ExecutionStrategyParameters parameters, Object result) {
    TypeMismatchError error = new TypeMismatchError(parameters.getPath(), parameters.getTypeInfo().getType());
    log.warn("{} got {}", error.getMessage(), result.getClass());
    context.addError(error);
    parameters.deferredErrorSupport().onError(error);
}
Also used : TypeMismatchError(graphql.TypeMismatchError)

Aggregations

TypeMismatchError (graphql.TypeMismatchError)1