Exception: GraphQL::UnresolvedTypeError
- Defined in:
- lib/graphql/unresolved_type_error.rb
Overview
Error raised when the value provided for a field can't be resolved to one of the possible types for the field.
Instance Method Summary collapse
-
#initialize(field_name, field_type, parent_type, received_type, possible_types) ⇒ UnresolvedTypeError
constructor
A new instance of UnresolvedTypeError.
Constructor Details
#initialize(field_name, field_type, parent_type, received_type, possible_types) ⇒ UnresolvedTypeError
Returns a new instance of UnresolvedTypeError.
5 6 7 8 |
# File 'lib/graphql/unresolved_type_error.rb', line 5 def initialize(field_name, field_type, parent_type, received_type, possible_types) = %|The value from "#{field_name}" on "#{parent_type}" could not be resolved to "#{field_type}". (Received: #{received_type.inspect}, Expected: [#{possible_types.map(&:inspect).join(", ")}])| super() end |