Exception: GraphQL::Schema::Enum::UnresolvedValueError
- Inherits:
-
EnumType::UnresolvedValueError
- Object
- StandardError
- Error
- EnumType::UnresolvedValueError
- GraphQL::Schema::Enum::UnresolvedValueError
- Defined in:
- lib/graphql/schema/enum.rb
Instance Method Summary collapse
-
#initialize(value:, enum:, context:) ⇒ UnresolvedValueError
constructor
A new instance of UnresolvedValueError.
Constructor Details
#initialize(value:, enum:, context:) ⇒ UnresolvedValueError
Returns a new instance of UnresolvedValueError.
27 28 29 30 31 32 33 34 35 |
# File 'lib/graphql/schema/enum.rb', line 27 def initialize(value:, enum:, context:) = ", but this isn't a valid value for `#{enum.graphql_name}`. Update the field or resolver to return one of `#{enum.graphql_name}`'s values instead." = if (cp = context[:current_path]) && (cf = context[:current_field]) "`#{cf.path}` returned `#{value.inspect}` at `#{cp.join(".")}`#{}" else "`#{value.inspect}` was returned for `#{enum.graphql_name}`#{}" end super() end |