GraphQLUnionType class
A special GraphQLType that indicates that an input value may be valid against one or more possibleTypes.
All provided types must be GraphQLObjectTypes.
- Inheritance
- Implemented types
-
- GraphQLType<
Value, Serialized>
- GraphQLType<
Constructors
-
GraphQLUnionType(String name, Iterable<
GraphQLType< possibleTypes)Map< >String, dynamic> , Map<String, dynamic> >
Properties
- description → String
-
A description of this type, which, while optional, can be very useful in tools like GraphiQL.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setteroverride
- name → String
-
The name of this type.
final
-
possibleTypes
→ List<
GraphQLObjectType> -
A list of all types that conform to this union.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
coerceToInputObject(
) → GraphQLType< Map< String, dynamic> , Map<String, dynamic> > -
Turns this type into one suitable for being provided as an input to a GraphQLObjectField.
override
-
convert(
Object? value) → Map< String, dynamic> ? -
Attempts to cast a dynamic
valueinto aSerializedinstance.inherited -
deserialize(
Map< String, dynamic> serialized) → Map<String, dynamic> -
Deserializes a serialized value.
override
-
list(
) → GraphQLListType< Map< String, dynamic> , Map<String, dynamic> > -
inherited
-
nonNullable(
) → GraphQLType< Map< String, dynamic> , Map<String, dynamic> > -
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(
Map< String, dynamic> value) → Map<String, dynamic> -
Serializes an arbitrary input value.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
String key, covariant Map< String, dynamic> input) → ValidationResult<Map< String, dynamic> > -
Performs type coercion against an
inputvalue, and returns a list of errors if the validation was unsuccessful.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override