Running the inventoryAdjustQuantities mutation on any API version returns changes list that’s twice as long as it should be (duplicated):
mutation ($input: InventoryAdjustQuantitiesInput!) {
inventoryAdjustQuantities(input: $input) {
inventoryAdjustmentGroup {
changes {
item {
id
}
}
}
userErrors {
field
message
}
}
}
Input:
{
"input": {
"name": "available",
"reason": "correction",
"changes": [
{
"inventoryItemId": "gid://shopify/InventoryItem/42384107569358",
"locationId": "gid://shopify/Location/64508100814",
"delta": 1
}
]
}
}
Returns a response like this:
{
"inventoryAdjustQuantities": {
"inventoryAdjustmentGroup": {
"changes": [
{
"item": {
"id": "gid://shopify/InventoryItem/42384107569358"
}
},
{
"item": {
"id": "gid://shopify/InventoryItem/42384107569358"
}
}
]
},
"userErrors": []
}
}
As you can see, we only specified to update a single inventory item, but two were returned in the changes result.
It seems if you include multiple duplicate inventory items, those are all combined in the result and two are still returned. Also, updating at another location causes another set of duplicates to be returned. I’m fine with this behavior, it should just return only one per item/location pair as expected.