class GraphQL::UnresolvedTypeError
Error raised when the value provided for a field can’t be resolved to one of the possible types for the field.
Attributes
Returns
-
GraphQL::Field— The field whose value couldn’t be resolved (field.typeis type which couldn’t be resolved)
Returns
-
GraphQL::BaseType— The owner offield
Returns
-
Array<GraphQL::BaseType>— The allowed options for resolvingvaluetofield.type
Returns
-
Object— The return of Schema.resolve_type forvalue
Returns
-
Object— The runtime value which couldn’t be successfully resolved withresolve_type
Public Class Methods
# File lib/graphql/unresolved_type_error.rb, line 32 def initialize(value, field, parent_type, resolved_type, possible_types) @value = value @field = field @parent_type = parent_type @resolved_type = resolved_type @possible_types = possible_types message = "The value from \"#{field.graphql_name}\" on \"#{parent_type.graphql_name}\" could not be resolved to \"#{field.type.to_type_signature}\". " \ "(Received: `#{resolved_type.inspect}`, Expected: [#{possible_types.map(&:graphql_name).join(", ")}]) " \ "Make sure you have defined a `resolve_type` proc on your schema and that value `#{value.inspect}` " \ "gets resolved to a valid type. You may need to add your type to `orphan_types` if it implements an " \ "interface but isn't a return type of any other field." super(message) end
Calls superclass method