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

graphql.schema.idl.errors.SchemaProblem Maven / Gradle / Ivy

There is a newer version: 230521-nf-execution
Show newest version
package graphql.schema.idl.errors;

import graphql.GraphQLError;
import graphql.GraphQLException;
import graphql.PublicApi;
import graphql.schema.idl.SchemaParser;

import java.util.ArrayList;
import java.util.List;

/**
 * A number of problems can occur when using the schema tools like {@link SchemaParser}
 * or {@link graphql.schema.idl.SchemaGenerator} classes and they are reported via this
 * exception as a list of {@link GraphQLError}s
 */
@PublicApi
public class SchemaProblem extends GraphQLException {

    private final List errors;

    public SchemaProblem(List errors) {
        this.errors = new ArrayList<>(errors);
    }

    @Override
    public String getMessage() {
        return "errors=" + errors;
    }

    public List getErrors() {
        return errors;
    }

    @Override
    public String toString() {
        return "SchemaProblem{" +
                "errors=" + errors +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy