Sha256: 9533433826b2599cff908e7b4e753c0e25327e4b0d3ee9ea27064724dc605583

Contents?: true

Size: 511 Bytes

Versions: 8

Compression:

Stored size: 511 Bytes

Contents

module GraphQL
  # Error raised when the value provided for a field can't be resolved to one of the possible types
  # for the field.
  class UnresolvedTypeError < GraphQL::Error
    def initialize(field_name, field_type, parent_type, received_type, possible_types)
      message = %|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(message)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
graphql-1.2.6 lib/graphql/unresolved_type_error.rb
graphql-1.2.5 lib/graphql/unresolved_type_error.rb
graphql-1.2.4 lib/graphql/unresolved_type_error.rb
graphql-1.2.3 lib/graphql/unresolved_type_error.rb
graphql-1.2.2 lib/graphql/unresolved_type_error.rb
graphql-1.2.1 lib/graphql/unresolved_type_error.rb
graphql-1.2.0 lib/graphql/unresolved_type_error.rb
graphql-1.1.0 lib/graphql/unresolved_type_error.rb