class GraphQL::Language::Nodes::FragmentSpread
Application of a named fragment in a selection
Attributes
children
[R]
Array[Directive]
directives
[R]
Array[Directive]
Returns
-
String— The identifier of the fragment to apply, corresponds withFragmentDefinition#name
Public Class Methods
# File lib/graphql/language/nodes.rb, line 727 def self.from_a(filename, line, col, name, directives, comment: nil) self.new(filename: filename, line: line, col: col, name: name, directives: directives) end
(?name: untyped, ?directives: Array[Directive], ?line: Integer?, ?col: Integer?, ?pos: Integer?, ?filename: String?, ?source: untyped) → void
Source
# File lib/graphql/language/nodes.rb, line 717 def initialize(name: nil, directives: NO_CHILDREN, line: nil, col: nil, pos: nil, filename: nil, source: nil) @line = line @col = col @pos = pos @filename = filename @source = source @name = name @directives = directives.freeze end
Public Instance Methods
Source
# File lib/graphql/language/nodes.rb, line 731 def marshal_dump [ line, col, # use methods here to force them to be calculated @filename, @name, @directives, ] end
Source
# File lib/graphql/language/nodes.rb, line 740 def marshal_load(values) @line, @col, @filename, @name, @directives = values end
# File lib/graphql/language/nodes.rb, line 710 def merge_directive(**node_opts) merge(directives: directives + [GraphQL::Language::Nodes::Directive.new(**node_opts)]) end
Source
# File lib/graphql/language/nodes.rb, line 703 def scalars @scalars ||= [@name].freeze end
Source
# File lib/graphql/language/nodes.rb, line 693 def visit_method :on_fragment_spread end