Class: GraphQL::Language::Nodes::FragmentDefinition
Overview
A reusable fragment, defined at document-level.
Constant Summary
Constants inherited
from AbstractNode
AbstractNode::NO_CHILDREN
Instance Attribute Summary
Attributes inherited from AbstractNode
#filename
Class Method Summary
collapse
Instance Method Summary
collapse
#==, #children, #children_method_name, children_of_type, #col, #definition_line, #delete_child, inherited, #initialize_copy, #line, #merge, #position, #replace_child, #scalars, #to_query_string
Constructor Details
#initialize(name: nil, type: nil, directives: NONE, selections: NONE, filename: nil, pos: nil, source: nil, line: nil, col: nil) ⇒ FragmentDefinition
447
448
449
450
451
452
453
454
455
456
457
|
# File 'lib/graphql/language/nodes.rb', line 447
def initialize(name: nil, type: nil, directives: NONE, selections: NONE, filename: nil, pos: nil, source: nil, line: nil, col: nil)
@name = name
@type = type
@directives = directives
@selections = selections
@filename = filename
@pos = pos
@source = source
@line = line
@col = col
end
|
Class Method Details
.from_a(filename, line, col, name, type, directives, selections) ⇒ Object
459
460
461
|
# File 'lib/graphql/language/nodes.rb', line 459
def self.from_a(filename, line, col, name, type, directives, selections)
self.new(filename: filename, line: line, col: col, name: name, type: type, directives: directives, selections: selections)
end
|
Instance Method Details
#marshal_dump ⇒ Object
463
464
465
|
# File 'lib/graphql/language/nodes.rb', line 463
def marshal_dump
[line, col, @filename, @name, @type, @directives, @selections]
end
|
#marshal_load(values) ⇒ Object
467
468
469
|
# File 'lib/graphql/language/nodes.rb', line 467
def marshal_load(values)
@line, @col, @filename, @name, @type, @directives, @selections = values
end
|