ExecutableDocument class Null safety

An executable document containing only ExecutableDefinitions.

If a Document contains only one operation, that operation may be unnamed or represented in the shorthand form, which omits both the query keyword and operation name.

Otherwise, if a GraphQL Document contains multiple operations, each operation must be named. When submitting a Document with multiple operations to a GraphQL service, the name of the desired operation to be executed must also be provided.

NOTE: the spec states that "Documents are only executable by a GraphQL service if they contain an OperationDefinition", however FragmentDefinition-only documents are currently treated as valid here.

Inheritance
Annotations

Constructors

ExecutableDocument(DocumentNode astNode, [ResolveType? getSchemaType, Iterable<DocumentNode> imports = const []])

Properties

astNode DocumentNode
final
definitions List<ExecutableDefinition>
read-only
fragments List<FragmentDefinition>
read-only
getSchemaType ResolveType?
final
getType GetExecutableType
read-only, override
hashCode int
The hash code for this object. [...]
read-only, inherited
operations List<OperationDefinition>
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

getFragment(String name) FragmentDefinition?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object o) bool
The equality operator. [...]
inherited