Class: GraphQL::Language::Nodes::Field
- Inherits:
-
AbstractNode
- Object
- AbstractNode
- GraphQL::Language::Nodes::Field
- Defined in:
- lib/graphql/language/nodes.rb
Instance Attribute Summary collapse
-
#alias ⇒ Object
Returns the value of attribute alias.
-
#arguments ⇒ Object
Returns the value of attribute arguments.
-
#directives ⇒ Object
Returns the value of attribute directives.
-
#name ⇒ Object
Returns the value of attribute name.
-
#selections ⇒ Object
Returns the value of attribute selections.
Attributes inherited from AbstractNode
Instance Method Summary collapse
Methods inherited from AbstractNode
child_attributes, #children, #initialize, #position, #to_query_string
Constructor Details
This class inherits a constructor from GraphQL::Language::Nodes::AbstractNode
Instance Attribute Details
#alias ⇒ Object
Returns the value of attribute alias.
109 110 111 |
# File 'lib/graphql/language/nodes.rb', line 109 def alias @alias end |
#arguments ⇒ Object
Returns the value of attribute arguments.
109 110 111 |
# File 'lib/graphql/language/nodes.rb', line 109 def arguments @arguments end |
#directives ⇒ Object
Returns the value of attribute directives.
109 110 111 |
# File 'lib/graphql/language/nodes.rb', line 109 def directives @directives end |
#name ⇒ Object
Returns the value of attribute name.
109 110 111 |
# File 'lib/graphql/language/nodes.rb', line 109 def name @name end |
#selections ⇒ Object
Returns the value of attribute selections.
109 110 111 |
# File 'lib/graphql/language/nodes.rb', line 109 def selections @selections end |
Instance Method Details
#initialize_node(name: nil, arguments: [], directives: [], selections: [], **kwargs) ⇒ Object
112 113 114 115 116 117 118 119 |
# File 'lib/graphql/language/nodes.rb', line 112 def initialize_node(name: nil, arguments: [], directives: [], selections: [], **kwargs) @name = name # oops, alias is a keyword: @alias = kwargs.fetch(:alias, nil) @arguments = arguments @directives = directives @selections = selections end |