Class: GraphQL::Language::Nodes::DirectiveDefinition

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

Instance Attribute Summary collapse

Attributes inherited from AbstractNode

#col, #filename, #line

Instance Method Summary collapse

Methods inherited from AbstractNode

#eql?, #initialize, #position, #scalars, #to_query_string

Constructor Details

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

Instance Attribute Details

#argumentsObject

Returns the value of attribute arguments



133
134
135
# File 'lib/graphql/language/nodes.rb', line 133

def arguments
  @arguments
end

#descriptionObject

Returns the value of attribute description



133
134
135
# File 'lib/graphql/language/nodes.rb', line 133

def description
  @description
end

#locationsObject

Returns the value of attribute locations



133
134
135
# File 'lib/graphql/language/nodes.rb', line 133

def locations
  @locations
end

#nameObject

Returns the value of attribute name



133
134
135
# File 'lib/graphql/language/nodes.rb', line 133

def name
  @name
end

Instance Method Details

#childrenObject



142
143
144
# File 'lib/graphql/language/nodes.rb', line 142

def children
  arguments + locations
end

#initialize_node(name: nil, arguments: [], locations: [], description: nil) ⇒ Object



135
136
137
138
139
140
# File 'lib/graphql/language/nodes.rb', line 135

def initialize_node(name: nil, arguments: [], locations: [], description: nil)
  @name = name
  @arguments = arguments
  @locations = locations
  @description = description
end