Sha256: 68ff356fabce2b36e9252b35a16c96142cbe91459de6c6c15e7c6416fcdc21e3
Contents?: true
Size: 670 Bytes
Versions: 29
Compression:
Stored size: 670 Bytes
Contents
# frozen_string_literal: true module GraphQL module StaticValidation class ArgumentsAreDefined < GraphQL::StaticValidation::ArgumentsValidator def validate_node(parent, node, defn, context) argument_defn = context.warden.arguments(defn).find { |arg| arg.name == node.name } if argument_defn.nil? kind_of_node = node_type(parent) error_arg_name = parent_name(parent, defn) context.errors << message("#{kind_of_node} '#{error_arg_name}' doesn't accept argument '#{node.name}'", parent, context: context) GraphQL::Language::Visitor::SKIP else nil end end end end end
Version data entries
29 entries across 29 versions & 1 rubygems