Class: GraphQL::UnauthorizedEnumValueError
- Inherits:
-
UnauthorizedError
- Object
- UnauthorizedError
- GraphQL::UnauthorizedEnumValueError
- Defined in:
- lib/graphql/unauthorized_enum_value_error.rb
Instance Attribute Summary collapse
-
#enum_value ⇒ Object
Returns.
Instance Method Summary collapse
-
#initialize(type:, context:, enum_value:) ⇒ UnauthorizedEnumValueError
constructor
A new instance of UnauthorizedEnumValueError.
Constructor Details
#initialize(type:, context:, enum_value:) ⇒ UnauthorizedEnumValueError
Returns a new instance of UnauthorizedEnumValueError.
11 12 13 14 15 |
# File 'lib/graphql/unauthorized_enum_value_error.rb', line 11 def initialize(type:, context:, enum_value:) @enum_value = enum_value ||= "#{enum_value.path} failed authorization" super(, object: enum_value.value, type: type, context: context) end |
Instance Attribute Details
#enum_value ⇒ Object
Returns
GraphQL::Schema::EnumValue— The value whose#authorized?check returned false
9 10 11 |
# File 'lib/graphql/unauthorized_enum_value_error.rb', line 9 def enum_value @enum_value end |