Class: GraphQL::Language::Nodes::NameOnlyNode

Inherits:
AbstractNode
  • Object
show all
Defined in:
lib/graphql/language/nodes.rb

Overview

Base class for nodes whose only value is a name (no child nodes or other scalars)

Direct Known Subclasses

Enum, NullValue, TypeName, VariableIdentifier

Instance Attribute Summary collapse

Attributes inherited from AbstractNode

#col, #filename, #line

Instance Method Summary collapse

Methods inherited from AbstractNode

child_attributes, #eql?, inherited, #initialize, #position, scalar_attributes, #scalars, #to_query_string

Constructor Details

This class inherits a constructor from GraphQL::Language::Nodes::AbstractNode

Instance Attribute Details

#nameObject

Returns the value of attribute name.



102
103
104
# File 'lib/graphql/language/nodes.rb', line 102

def name
  @name
end

Instance Method Details

#childrenObject



109
110
111
# File 'lib/graphql/language/nodes.rb', line 109

def children
  [].freeze
end

#initialize_node(name: nil) ⇒ Object



105
106
107
# File 'lib/graphql/language/nodes.rb', line 105

def initialize_node(name: nil)
  @name = name
end