Class: GraphQL::Language::Nodes::ObjectTypeExtension

Inherits:
AbstractNode
  • Object
show all
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

#directivesObject

Returns the value of attribute directives



465
466
467
# File 'lib/graphql/language/nodes.rb', line 465

def directives
  @directives
end

#fieldsObject

Returns the value of attribute fields



465
466
467
# File 'lib/graphql/language/nodes.rb', line 465

def fields
  @fields
end

#interfacesObject

Returns the value of attribute interfaces



465
466
467
# File 'lib/graphql/language/nodes.rb', line 465

def interfaces
  @interfaces
end

#nameObject

Returns the value of attribute name



465
466
467
# File 'lib/graphql/language/nodes.rb', line 465

def name
  @name
end

Instance Method Details

#childrenObject



474
475
476
# File 'lib/graphql/language/nodes.rb', line 474

def children
  interfaces + fields + directives
end

#initialize_node(name:, interfaces:, fields:, directives: []) ⇒ Object



467
468
469
470
471
472
# File 'lib/graphql/language/nodes.rb', line 467

def initialize_node(name:, interfaces:, fields:, directives: [])
  @name = name
  @interfaces = interfaces || []
  @directives = directives
  @fields = fields
end