Method: GraphQL::Language::Visitor#on_field_children

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

#on_field_children(new_node) ⇒ Object



77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/graphql/language/visitor.rb', line 77

def on_field_children(new_node)
  new_node.arguments.each do |arg_node| # rubocop:disable Development/ContextIsPassedCop
    new_child_and_node = on_argument_with_modifications(arg_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 = visit_directives(new_node)
  new_node = visit_selections(new_node)
  new_node
end