GraphQLEnumType<Value> class

A GraphQLType with only a predetermined number of possible values.

Though these are serialized as strings, they carry special meaning with a type system.

Inheritance

Constructors

GraphQLEnumType(String name, List<GraphQLEnumValue<Value>> values, { String description })

Properties

description → String
A description of this enum type, for tools like GraphiQL.
final
name → String
The name of this enum type.
final
values → List<GraphQLEnumValue<Value>>
The defined set of possible values for this type. [...]
final
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
valueType → Type
read-only, inherited

Methods

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

Operators

operator ==(dynamic other) → bool
The equality operator. [...]