VariableDefinition class Null safety

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

Constructors

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

Properties

astNode VariableDefinitionNode
final
defaultValue DefaultValue
read-only
directives List<Directive>
read-only
getType GetExecutableType
final, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
name String
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
schemaType GraphQLType
read-only
variable → Variable
read-only

Methods

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