class GraphQL::Execution::Lookahead

def find_selected_nodes(node, field_name, field_defn, arguments:, matches:, alias_name: NOT_CONFIGURED)

and matches the `arguments:` constraints, then add that node to `matches`
If a selection on `node` matches `field_name` (which is backed by `field_defn`)
def find_selected_nodes(node, field_name, field_defn, arguments:, matches:, alias_name: NOT_CONFIGURED)
  return if skipped_by_directive?(node)
  case node
  when GraphQL::Language::Nodes::Field
    if node.name == field_name && (NOT_CONFIGURED.equal?(alias_name) || node.alias == alias_name)
      if arguments.nil? || arguments.empty?
        # No constraint applied
        matches << node
      elsif arguments_match?(arguments, field_defn, node)
        matches << node
      end
    end
  when GraphQL::Language::Nodes::InlineFragment
    node.selections.each { |s| find_selected_nodes(s, field_name, field_defn, arguments: arguments, matches: matches, alias_name: alias_name) }
  when GraphQL::Language::Nodes::FragmentSpread
    frag_defn = lookup_fragment(node)
    frag_defn.selections.each { |s| find_selected_nodes(s, field_name, field_defn, arguments: arguments, matches: matches, alias_name: alias_name) }
  else
    raise "Unexpected selection comparison on #{node.class.name} (#{node})"
  end
end