Purchase_order_update fails

My purchase_order_update query failed, I only specified the required arguments, which is just po_id in this case:

{
  "errors": [
    {
      "message": "Unexpected Error",
      "operation": "purchase_order_update",
      "field": "purchase_order_update",
      "request_id": "5e2a2c90fd7542bc9347515b",
      "code": 22
    }
  ],
  "data": {
    "purchase_order_update": null
  }
}

What is the real error message?

Hi @nturk !

This might be because you are sending a mutation for updating a purchase order.

This mutation has a required argument that is po_id, because it needs it to identify the purchase order you want to update, but you’ll also have to insert another field (the field you want to update), as po_date for example.

On the other hand, if you want just to look at info about that specific purchase order, you’ll have to use a query for it, instead of a mutation (purchase_order query for example)

Let me know if this doesn’t help,
Thanks!
Tom

1 Like

Hey @tomasw

Thanks for the answer, that makes sense. I hope they update the error message with that information.

Thanks,
Nick