GraphQLType<Value, Serialized> class

Strictly dictates the structure of some input data in a GraphQL query.

GraphQL's rigid type system is primarily implemented in Dart using classes that extend from GraphQLType.

A GraphQLType represents values of type Value as values of type Serialized; for example, a GraphQLType that serializes objects into Strings.

Implementers

Constructors

GraphQLType()

Properties

description String
A description of this type, which, while optional, can be very useful in tools like GraphiQL.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
name String
The name of this type.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

coerceToInputObject() GraphQLType<Value, Serialized>
Turns this type into one suitable for being provided as an input to a GraphQLObjectField.
convert(dynamic value) → Serialized
Attempts to cast a dynamic value into a Serialized instance.
deserialize(Serialized serialized) → Value
Deserializes a serialized value.
nonNullable() GraphQLType<Value, Serialized>
Creates a non-nullable type that represents this type, and enforces that a field of this type is present in input data.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
serialize(Value value) → Serialized
Serializes an arbitrary input value.
toString() String
Returns a string representation of this object.
override
validate(String key, Serialized input) ValidationResult<Serialized>
Performs type coercion against an input value, and returns a list of errors if the validation was unsuccessful.

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited