Class: GraphQL::Language::Nodes::VariableDefinition
- Inherits:
-
AbstractNode
- Object
- AbstractNode
- GraphQL::Language::Nodes::VariableDefinition
- Defined in:
- lib/graphql/language/nodes.rb
Overview
An operation-level query variable
Instance Attribute Summary collapse
-
#default_value ⇒ String, ...
A Ruby value to use if no other value is provided.
-
#name ⇒ String
The identifier for this variable, without
$
. -
#type ⇒ TypeName, ...
The expected type of this value.
Attributes inherited from AbstractNode
Instance Method Summary collapse
Methods inherited from AbstractNode
#children, #eql?, #initialize, #position, #to_query_string
Constructor Details
This class inherits a constructor from GraphQL::Language::Nodes::AbstractNode
Instance Attribute Details
#default_value ⇒ String, ...
Returns A Ruby value to use if no other value is provided
366 367 368 |
# File 'lib/graphql/language/nodes.rb', line 366 def default_value @default_value end |
#name ⇒ String
Returns The identifier for this variable, without $
375 376 377 |
# File 'lib/graphql/language/nodes.rb', line 375 def name @name end |
#type ⇒ TypeName, ...
Returns The expected type of this value
369 370 371 |
# File 'lib/graphql/language/nodes.rb', line 369 def type @type end |
Instance Method Details
#initialize_node(name: nil, type: nil, default_value: nil) ⇒ Object
375 376 377 378 379 |
# File 'lib/graphql/language/nodes.rb', line 375 def initialize_node(name: nil, type: nil, default_value: nil) @name = name @type = type @default_value = default_value end |
#scalars ⇒ Object
381 382 383 |
# File 'lib/graphql/language/nodes.rb', line 381 def scalars [name, type, default_value] end |