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
            }
        }
    }
}
Andreas_Sch
Excursionist
16 0 0

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

0 Likes
Andreas_Sch
Excursionist
16 0 0

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.

0 Likes
NorioUmata
Tourist
3 0 0

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!

 

0 Likes