Sha256: daf29f75c1296f07b6f755e98bc495c84b336cdf71c038a9f2b66988009470d4

Contents?: true

Size: 504 Bytes

Versions: 9

Compression:

Stored size: 504 Bytes

Contents

class GraphQL::StaticValidation::ArgumentsAreDefined < GraphQL::StaticValidation::ArgumentsValidator
  def validate_node(parent, node, defn, context)
    argument_defn = defn.arguments[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)
      GraphQL::Language::Visitor::SKIP
    else
      nil
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
graphql-0.12.1 lib/graphql/static_validation/rules/arguments_are_defined.rb
graphql-0.12.0 lib/graphql/static_validation/rules/arguments_are_defined.rb
graphql-0.11.1 lib/graphql/static_validation/rules/arguments_are_defined.rb
graphql-0.11.0 lib/graphql/static_validation/rules/arguments_are_defined.rb
graphql-0.10.9 lib/graphql/static_validation/rules/arguments_are_defined.rb
graphql-0.10.8 lib/graphql/static_validation/rules/arguments_are_defined.rb
graphql-0.10.7 lib/graphql/static_validation/rules/arguments_are_defined.rb
graphql-0.10.6 lib/graphql/static_validation/rules/arguments_are_defined.rb
graphql-0.10.5 lib/graphql/static_validation/rules/arguments_are_defined.rb