orderEditBegin returning an empty calculatedOrder object

Danut
Visitor
2 0 0

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.

Reply 1 (1)

Danut
Visitor
2 0 0

Found the issue. The order id was wrong.