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

graphql.introspection.IntrospectionDisabledError Maven / Gradle / Ivy

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

import graphql.ErrorClassification;
import graphql.ErrorType;
import graphql.GraphQLError;
import graphql.Internal;
import graphql.language.SourceLocation;

import java.util.Collections;
import java.util.List;

@Internal
public class IntrospectionDisabledError implements GraphQLError {

    private final List locations;

    public IntrospectionDisabledError(SourceLocation sourceLocation) {
        locations = sourceLocation == null ? Collections.emptyList() : Collections.singletonList(sourceLocation);
    }

    @Override
    public String getMessage() {
        return "Introspection has been disabled for this request";
    }

    @Override
    public List getLocations() {
        return locations;
    }

    @Override
    public ErrorClassification getErrorType() {
        return ErrorClassification.errorClassification("IntrospectionDisabled");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy