app/graphql/types/order_interface.rb
# Optional: if this method is defined, it overrides `Schema.resolve_type`
if this method is defined, it overrides `Schema.resolve_type`
if this method is defined it overrides ` Schema . resolve_type `
def resolve_type(object, _context)
      case object.mode
      when Order::BUY then Types::BuyOrderType
      when Order::OFFER then Types::OfferOrderType
      else
        raise 'Unknown order type'
      end
    end
def resolve_type ( object , _context ) case object . mode when Order :: BUY then Types :: BuyOrderType when Order :: OFFER then Types :: OfferOrderType else raise 'Unknown order type' end end
Optional: if this method is defined, it overrides `Schema.resolve_type`
Optional : if this method is defined it overrides ` Schema . resolve_type `
object
_context