orderEditSetQuantity getting error response "invalid id"

Dhananjay_Khose
New Member
1 0 1


mutation MyMutationadditem {
  orderEditSetQuantity(id"gid://shopify/CalculatedOrder/1832681575"lineItemId"gid://shopify/LineItem/5297807917159"quantity5){
     calculatedLineItem {
      id
    }
  }
}
 
I check the IDs are correct but still getting response. Any help would be appreciated.
 
 
{
    "data": {
        "orderEditSetQuantity"null
    },
    "errors": [
        {
            "message""invalid id",
            "locations": [
                {
                    "line"7,
                    "column"3
                }
            ],
            "path": [
                "orderEditSetQuantity"
            ]
        }
    ],
    "extensions": {
        "cost": {
            "requestedQueryCost"10,
            "actualQueryCost"0,
            "throttleStatus": {
                "maximumAvailable"2000.0,
                "currentlyAvailable"2000,
                "restoreRate"100.0
            }
        }
    }
}
Replies 3 (3)
Andreas_Sch
Excursionist
18 0 4

Did you figure out, what had been the problem?
Currently ran into the same. I am sure, others also would benefit. 😉

Andreas_Sch
Excursionist
18 0 4

Was tired, when I stumbled over the "Problem". Error message could give some detail which id causes the error though...

When somebody else runs into this, very likely you either used the Order.id instead of the CalculatedOrder.id, or the LineItem.id instead of the CalculatedLineItem.id.

Happy coding. 😉

NorioUmata
Tourist
3 0 3

Hi all!

I saw you are using wrong line item id.

You need to use calculated line item id for example gid://shopify/CalculatedLineItem/6390811525278

Hope this helps!