Sha256: 7379886b76c4b927866682ee8095938b7bfd2aa02434763c7cdd0776b9423a4c

Contents?: true

Size: 497 Bytes

Versions: 5

Compression:

Stored size: 497 Bytes

Contents

class GraphQL::StaticValidation::ArgumentsAreDefined < GraphQL::StaticValidation::ArgumentsValidator
  def validate_node(node, defn, context)
    skip = nil

    node.arguments.each do |argument|
      argument_defn = defn.arguments[argument.name]
      if argument_defn.nil?
        context.errors << message("#{node.class.name.split("::").last} '#{node.name}' doesn't accept argument #{argument.name}", node)
        skip = GraphQL::Language::Visitor::SKIP
      end
    end

    skip
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
graphql-0.7.1 lib/graphql/static_validation/rules/arguments_are_defined.rb
graphql-0.7.0 lib/graphql/static_validation/rules/arguments_are_defined.rb
graphql-0.6.2 lib/graphql/static_validation/rules/arguments_are_defined.rb
graphql-0.6.1 lib/graphql/static_validation/rules/arguments_are_defined.rb
graphql-0.6.0 lib/graphql/static_validation/rules/arguments_are_defined.rb