Method: GraphQL::Language::Visitor#visit_directives

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

#visit_directives(new_node) ⇒ Object



90
91
92
93
94
95
96
97
98
99
# File 'lib/graphql/language/visitor.rb', line 90

def visit_directives(new_node)
  new_node.directives.each do |dir_node|
    new_child_and_node = on_directive_with_modifications(dir_node, new_node)
    # Reassign `node` in case the child hook makes a modification
    if new_child_and_node.is_a?(Array)
      new_node = new_child_and_node[1]
    end
  end
  new_node
end