class GraphQL::Execution::Interpreter::ListResultFailedError

Public Class Methods

new(value:, path:, field:) click to toggle source
Calls superclass method
# File lib/graphql/execution/interpreter.rb, line 87
def initialize(value:, path:, field:)
  message = "Failed to build a GraphQL list result for field `#{field.path}` at path `#{path.join(".")}`.\n".dup

  message << "Expected `#{value.inspect}` (#{value.class}) to implement `.each` to satisfy the GraphQL return type `#{field.type.to_type_signature}`.\n"

  if field.connection?
    message << "\nThis field was treated as a Relay-style connection; add `connection: false` to the `field(...)` to disable this behavior."
  end
  super(message)
end