orderEditBegin returning an empty calculatedOrder object

AI-generated summary

Issue: A developer attempted to add a product to an order on the Thank You page using Shopify’s GraphQL mutation orderEditBegin but received an empty calculatedOrder (no ID), blocking subsequent mutations.

Context: The order was not archived and was created directly in the store. The app was in development mode on a testing store. Throttle/cost metrics appeared normal, suggesting no rate limit issue.

Details: The mutation request (orderEditBegin) asked for calculatedOrder { id }, but the response returned calculatedOrder as null/empty.

Resolution: The root cause was an incorrect order ID supplied in the mutation. After correcting the order ID, the issue was resolved.

Status: Resolved. No platform bug identified; the failure was due to using a wrong order identifier.

The app which i’m working on must add a product to an order on thank you page. I tried with GraphQL mutations but on first mutation orderEditBegin it is returning an empty calculatedOrder object. I need the id to can use the next mutations. Why this should happen? The order is not archived and it was created directly on store. The app is in development mode and the store is a testing store.

Here is the request:

mutation beginEdit{
orderEditBegin(id: “gid://shopify/Order/1015”){
calculatedOrder{
id
}
}

and here is what i received:

Array
(
[data] => Array
(
[orderEditBegin] => Array
(
[calculatedOrder] =>
)

)

[extensions] => Array
(
[cost] => Array
(
[requestedQueryCost] => 10
[actualQueryCost] => 10
[throttleStatus] => Array
(
[maximumAvailable] => 1000
[currentlyAvailable] => 990
[restoreRate] => 50
)

)

)

)

This is the request id: 2c29d983-adad-4808-9876-90f418f99281

Thanks.

Found the issue. The order id was wrong.