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

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

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

import graphql.Internal;
import graphql.language.EnumValueDefinition;
import graphql.language.FieldDefinition;
import graphql.language.InputValueDefinition;
import graphql.language.TypeDefinition;

import static java.lang.String.format;

@Internal
public class NonUniqueArgumentError extends BaseError {

    public NonUniqueArgumentError(TypeDefinition typeDefinition, FieldDefinition fieldDefinition, String argumentName) {
        super(typeDefinition, format("The type '%s' with field '%s' %s has declared an argument with a non unique name '%s'",
                typeDefinition.getName(), fieldDefinition.getName(), lineCol(typeDefinition), argumentName));
    }

    public NonUniqueArgumentError(TypeDefinition typeDefinition, InputValueDefinition inputValueDefinition, String argumentName) {
        super(typeDefinition, format("The type '%s' with input value '%s' %s has declared an argument with a non unique name '%s'",
                typeDefinition.getName(), inputValueDefinition.getName(), lineCol(typeDefinition), argumentName));
    }

    public NonUniqueArgumentError(TypeDefinition typeDefinition, EnumValueDefinition enumValueDefinition, String argumentName) {
        super(typeDefinition, format("The '%s' type with enum value '%s' %s has declared an argument with a non unique name '%s'",
                typeDefinition.getName(), enumValueDefinition.getName(), lineCol(typeDefinition), argumentName));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy