Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

orderEditBegin returning an empty calculatedOrder object

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.