Exception: GraphQL::UnauthorizedEnumValueError
- Inherits:
-
UnauthorizedError
- Object
- StandardError
- Error
- UnauthorizedError
- GraphQL::UnauthorizedEnumValueError
- Defined in:
- lib/graphql/unauthorized_enum_value_error.rb
Instance Attribute Summary collapse
-
#enum_value ⇒ GraphQL::Schema::EnumValue
The value whose
#authorized?
check returned false.
Attributes inherited from UnauthorizedError
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.
7 8 9 10 11 |
# File 'lib/graphql/unauthorized_enum_value_error.rb', line 7 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 ⇒ GraphQL::Schema::EnumValue
Returns The value whose #authorized?
check returned false.
5 6 7 |
# File 'lib/graphql/unauthorized_enum_value_error.rb', line 5 def enum_value @enum_value end |