Sha256: 368bc8fc1ec3e41d8e8aa2c59941d092e7765b7ed6991045e8050f63fcd88b47

Contents?: true

Size: 470 Bytes

Versions: 25

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

25 entries across 25 versions & 1 rubygems

Version Path
graphql-2.4.14 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.3.22 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.3.21 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.4.13 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.4.12 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.4.11 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.4.10 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.4.9 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.4.8 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.4.7 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.4.6 lib/graphql/unauthorized_enum_value_error.rb
graphql-2.4.5 lib/graphql/unauthorized_enum_value_error.rb
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