All Downloads are FREE. Search and download functionalities are using the official Maven repository.

graphql.schema.validation.InvalidSchemaException Maven / Gradle / Ivy

The newest version!
package graphql.schema.validation;

import graphql.GraphQLException;

import java.util.Collection;

public class InvalidSchemaException extends GraphQLException {

    public InvalidSchemaException(Collection errors) {
        super(buildErrorMsg(errors));
    }

    private static String buildErrorMsg(Collection errors) {
        StringBuilder message = new StringBuilder("invalid schema:");
        for (ValidationError error : errors) {
            message.append("\n").append(error.getDescription());
        }
        return message.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy