VariableDefinition class

Variables can be used to parameterize OperationDefinitions, maximizing query reuse, and avoiding costly string building in clients at runtime.

If not defined as constant (for example, in DefaultValue), a Variable can be supplied for an InputValueDefinition.

Variables must be defined at the top of an operation and are in scope throughout the execution of that operation.

Inheritance
Annotations
  • @immutable

Constructors

VariableDefinition(VariableDefinitionNode astNode, [GetExecutableType? getType])
const

Properties

astNode VariableDefinitionNode
final
defaultValue DefaultValue
no setter
directives List<Directive>
no setter
getType GetExecutableType
finalinherited
hashCode int
The hash code for this object.
no setterinherited
name String
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schemaType GraphQLType
no setter
variable → Variable
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