Discuss all the new features introduced with the new product model in GraphQL.
query = <<~QUERY
mutation {
inventoryAdjustQuantities(
input: {reason: "correction", name: "available", changes: [{inventoryItemId: "gid://shopify/InventoryItem/#{inventory_item_id}", delta: #{available}, locationId: #{location}}]}
) {
inventoryAdjustmentGroup {
createdAt
reason
changes {
name
delta
}
}
userErrors {
field
message
}
}
}
QUERY
Here delta i've got -23. This means that the available quantity of that product in inventory will decrease by 23 from 158, and will update to 135. However, the available quantity will not be updated.
Have any solution for this kind of problem?
Solved! Go to the solution
This is an accepted solution.
Solution:-
Previously I've sent #{location} -> gid://shopify/Location/location_id like this, Now I changed it to a string format like:- "gid://shopify/Location/location_id"
This is an accepted solution.
Solution:-
Previously I've sent #{location} -> gid://shopify/Location/location_id like this, Now I changed it to a string format like:- "gid://shopify/Location/location_id"