Sha256: 368bc8fc1ec3e41d8e8aa2c59941d092e7765b7ed6991045e8050f63fcd88b47

Contents?: true

Size: 470 Bytes

Versions: 13

Compression:

Stored size: 470 Bytes

Contents

# frozen_string_literal: true
module GraphQL
  class UnauthorizedEnumValueError < GraphQL::UnauthorizedError
    # @return [GraphQL::Schema::EnumValue] The value whose `#authorized?` check returned false
    attr_accessor :enum_value

    def initialize(type:, context:, enum_value:)
      @enum_value = enum_value
      message ||= "#{enum_value.path} failed authorization"
      super(message, object: enum_value.value, type: type, context: context)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
graphql-2.4.4 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.4.3 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.4.2 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.4.1 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.4.0 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.3.20 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.3.19 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.3.18 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.3.17 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.3.16 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.3.15 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.3.14 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.3.13 lib/graphql/unauthorized_enum_value_error.rb