Class: GraphQL::Language::Nodes::FragmentDefinition

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

Overview

A reusable fragment, defined at document-level.

Instance Attribute Summary collapse

Attributes inherited from AbstractNode

#col, #filename, #line

Instance Method Summary collapse

Methods inherited from AbstractNode

child_attributes, #children, #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

#directivesObject

Returns the value of attribute directives



219
220
221
# File 'lib/graphql/language/nodes.rb', line 219

def directives
  @directives
end

#nameString



223
224
225
# File 'lib/graphql/language/nodes.rb', line 223

def name
  @name
end

#selectionsObject

Returns the value of attribute selections



219
220
221
# File 'lib/graphql/language/nodes.rb', line 219

def selections
  @selections
end

#typeString



228
229
230
# File 'lib/graphql/language/nodes.rb', line 228

def type
  @type
end

Instance Method Details

#initialize_node(name: nil, type: nil, directives: [], selections: []) ⇒ Object



228
229
230
231
232
233
# File 'lib/graphql/language/nodes.rb', line 228

def initialize_node(name: nil, type: nil, directives: [], selections: [])
  @name = name
  @type = type
  @directives = directives
  @selections = selections
end