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

graphql.schema.GraphQLScalarType Maven / Gradle / Ivy

There is a newer version: 2.4.0-no-slf4j
Show newest version
package graphql.schema;


import static graphql.Assert.assertNotNull;

public class GraphQLScalarType implements GraphQLType, GraphQLInputType, GraphQLOutputType, GraphQLUnmodifiedType, GraphQLNullableType {

    private final String name;
    private final String description;
    private final Coercing coercing;


    public GraphQLScalarType(String name, String description, Coercing coercing) {
        assertNotNull(name, "name can't be null");
        assertNotNull(coercing, "coercing can't be null");
        this.name = name;
        this.description = description;
        this.coercing = coercing;
    }

    public String getName() {
        return name;
    }


    public String getDescription() {
        return description;
    }


    public Coercing getCoercing() {
        return coercing;
    }

    @Override
    public String toString() {
        return "GraphQLScalarType{" +
                "name='" + name + '\'' +
                ", description='" + description + '\'' +
                ", coercing=" + coercing +
                '}';
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy