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
hashCode int
The hash code for this object.
no setteroverride
name String
The name of this enum type.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values List<GraphQLEnumValue<Value>>
The defined set of possible values for this type.
final
valueType Type
no setterinherited

Methods

coerceToInputObject() GraphQLType<Value, String>
Turns this type into one suitable for being provided as an input to a GraphQLObjectField.
override
convert(dynamic value) String?
Attempts to cast a dynamic value into a Serialized instance.
override
deserialize(String serialized) → Value
Deserializes a serialized value.
override
list() GraphQLListType<Value, String>
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 nonexistent method or property is accessed.
inherited
serialize(Value value) String
Serializes an arbitrary input value.
override
toString() String
A string representation of this object.
inherited
validate(String key, covariant String input) ValidationResult<String>
Performs type coercion against an input value, and returns a list of errors if the validation was unsuccessful.
override

Operators

operator ==(Object other) bool
The equality operator.
override