GraphQLInputObjectType class

A special GraphQLType that specifies the shape of an object that can only be used as an input to a GraphQLField.

GraphQL input object types are different from regular GraphQLObjectTypes in that they do not support resolution, and are overall more limiter in utility, because their only purpose is to reduce the number of parameters to a given field, and to potentially reuse an input structure across multiple fields in the hierarchy.

Inheritance
Implemented types
Implementers

Constructors

GraphQLInputObjectType(String name, {String? description, Iterable<GraphQLInputObjectField> inputFields = const []})

Properties

description String?
An optional type of this type, which is useful for tools like GraphiQL.
final
hashCode int
The hash code for this object.
no setteroverride
inputFields List<GraphQLInputObjectField>
A list of the fields that an input object of this type is expected to have.
final
name String
The name of this type.
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(dynamic value) Map<String, dynamic>?
Attempts to cast a dynamic value into a Serialized instance.
inherited
deserialize(Map 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 value) Map<String, dynamic>
Serializes an arbitrary input value.
override
toString() String
A string representation of this object.
inherited
validate(String key, covariant Map input) ValidationResult<Map<String, dynamic>>
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