UnionTypeDefinition class
Unions represent an object that could be one of a list of GraphQL Object types (ObjectTypeDefinition), but provides for no guaranteed fields between those types.
They also differ from interfaces in that Object types declare what interfaces they implement, but are not aware of what unions contain them.
See TypeDefinition for details on all GraphQL Type Definitions.
- Inheritance
-
- Object
- GraphQLEntity
- TypeSystemDefinition
- TypeDefinition
- TypeDefinitionWithResolver
- UnionTypeDefinition
- Mixed-in types
- Annotations
-
- @immutable
Constructors
- UnionTypeDefinition(UnionTypeDefinitionNode astNode, [ResolveType? getType])
-
const
Properties
- astNode → UnionTypeDefinitionNode
-
The underlying definition node from
gql/ast.dart
final - description → String?
-
no setterinherited
-
directives
→ List<
Directive> -
no setterinherited
- getType → ResolveType
-
Resolve the given
name
into a TypeDefinition, usually defined within the given context such as aGraphQLSchema
.final - hashCode → int
-
The hash code for this object.
no setterinherited
- name → String?
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
typeNames
→ List<
NamedType> -
no setter
-
types
→ List<
ObjectTypeDefinition> -
http://spec.graphql.org/draft/#sel-HAHdfFDABABlG3ib:
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object o) → bool -
The equality operator.
inherited