Module: GraphQL::Language::Nodes::AbstractNode::DefinitionNode

Defined in:
lib/graphql/language/nodes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#definition_lineInteger (readonly)

This AST node’s GraphQL::Language::Nodes::AbstractNode#line returns the first line, which may be the description.

Returns:

  • (Integer)

    The first line of the definition (not the description)



17
18
19
# File 'lib/graphql/language/nodes.rb', line 17

def definition_line
  @definition_line
end

Instance Method Details

#initialize(definition_line: nil, **_rest) ⇒ Object



19
20
21
22
# File 'lib/graphql/language/nodes.rb', line 19

def initialize(definition_line: nil, **_rest)
  @definition_line = definition_line
  super(**_rest)
end

#marshal_dumpObject



24
25
26
# File 'lib/graphql/language/nodes.rb', line 24

def marshal_dump
  super << @definition_line
end

#marshal_load(values) ⇒ Object



28
29
30
31
# File 'lib/graphql/language/nodes.rb', line 28

def marshal_load(values)
  @definition_line = values.pop
  super
end