Search in sources :

Example 1 with MissingRootTypeException

use of graphql.execution.MissingRootTypeException in project graphql-java by graphql-java.

the class ExecutionResultJSONTesting method createER.

private ExecutionResult createER() {
    List<GraphQLError> errors = new ArrayList<>();
    errors.add(new ValidationError(ValidationErrorType.UnknownType, mkLocations(), "Test ValidationError"));
    errors.add(new MissingRootTypeException("Mutations are not supported.", null));
    errors.add(new InvalidSyntaxError(mkLocations(), "Not good syntax m'kay"));
    errors.add(new NonNullableFieldWasNullError(new NonNullableFieldWasNullException(mkTypeInfo(), mkPath())));
    errors.add(new SerializationError(mkPath(), new CoercingSerializeException("Bad coercing")));
    errors.add(new ExceptionWhileDataFetching(mkPath(), new RuntimeException("Bang"), mkLocation(666, 999)));
    return new ExecutionResultImpl(null, errors);
}
Also used : NonNullableFieldWasNullException(graphql.execution.NonNullableFieldWasNullException) MissingRootTypeException(graphql.execution.MissingRootTypeException) NonNullableFieldWasNullError(graphql.execution.NonNullableFieldWasNullError) ArrayList(java.util.ArrayList) SerializationError(graphql.SerializationError) InvalidSyntaxError(graphql.InvalidSyntaxError) ExecutionResultImpl(graphql.ExecutionResultImpl) GraphQLError(graphql.GraphQLError) ExceptionWhileDataFetching(graphql.ExceptionWhileDataFetching) ValidationError(graphql.validation.ValidationError) CoercingSerializeException(graphql.schema.CoercingSerializeException)

Aggregations

ExceptionWhileDataFetching (graphql.ExceptionWhileDataFetching)1 ExecutionResultImpl (graphql.ExecutionResultImpl)1 GraphQLError (graphql.GraphQLError)1 InvalidSyntaxError (graphql.InvalidSyntaxError)1 SerializationError (graphql.SerializationError)1 MissingRootTypeException (graphql.execution.MissingRootTypeException)1 NonNullableFieldWasNullError (graphql.execution.NonNullableFieldWasNullError)1 NonNullableFieldWasNullException (graphql.execution.NonNullableFieldWasNullException)1 CoercingSerializeException (graphql.schema.CoercingSerializeException)1 ValidationError (graphql.validation.ValidationError)1 ArrayList (java.util.ArrayList)1