Sha256: 7c1885814276e4a6aef3750c362d39c2582375ecbe8a77ee8b92309953a129fb

Contents?: true

Size: 815 Bytes

Versions: 62

Compression:

Stored size: 815 Bytes

Contents

# frozen_string_literal: true
module GraphQL
  module StaticValidation
    class ArgumentsAreDefinedError < StaticValidation::Error
      attr_reader :name
      attr_reader :type_name
      attr_reader :argument_name

      def initialize(message, path: nil, nodes: [], name:, type:, argument:)
        super(message, path: path, nodes: nodes)
        @name = name
        @type_name = type
        @argument_name = argument
      end

      # A hash representation of this Message
      def to_h
        extensions = {
          "code" => code,
          "name" => name,
          "typeName" => type_name,
          "argumentName" => argument_name
        }

        super.merge({
          "extensions" => extensions
        })
      end

      def code
        "argumentNotAccepted"
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
graphql-1.11.10 lib/graphql/static_validation/rules/arguments_are_defined_error.rb
graphql-1.11.9 lib/graphql/static_validation/rules/arguments_are_defined_error.rb
graphql-1.12.6 lib/graphql/static_validation/rules/arguments_are_defined_error.rb
graphql-1.12.5 lib/graphql/static_validation/rules/arguments_are_defined_error.rb
graphql-1.11.8 lib/graphql/static_validation/rules/arguments_are_defined_error.rb
graphql-1.12.4 lib/graphql/static_validation/rules/arguments_are_defined_error.rb
graphql-1.12.3 lib/graphql/static_validation/rules/arguments_are_defined_error.rb
graphql-1.12.2 lib/graphql/static_validation/rules/arguments_are_defined_error.rb
graphql-1.12.1 lib/graphql/static_validation/rules/arguments_are_defined_error.rb
graphql-1.12.0 lib/graphql/static_validation/rules/arguments_are_defined_error.rb
graphql-1.11.7 lib/graphql/static_validation/rules/arguments_are_defined_error.rb
graphql-1.11.6 lib/graphql/static_validation/rules/arguments_are_defined_error.rb
graphql-1.11.5 lib/graphql/static_validation/rules/arguments_are_defined_error.rb
graphql-1.11.4 lib/graphql/static_validation/rules/arguments_are_defined_error.rb
graphql-1.11.3 lib/graphql/static_validation/rules/arguments_are_defined_error.rb
graphql-1.11.2 lib/graphql/static_validation/rules/arguments_are_defined_error.rb
graphql-1.10.14 lib/graphql/static_validation/rules/arguments_are_defined_error.rb
graphql-1.11.1 lib/graphql/static_validation/rules/arguments_are_defined_error.rb
graphql-1.10.13 lib/graphql/static_validation/rules/arguments_are_defined_error.rb
graphql-1.11.0 lib/graphql/static_validation/rules/arguments_are_defined_error.rb