Hi guys
I am trying to Create (and then update) a simple product with options and stock qty for that variant..
I try the below but I get an error: “message”: “Argument ‘inventoryItem’ on InputObject ‘ProductVariantInput’ has an invalid value ([{cost: "0.00", tracked: true}]). Expected type ‘InventoryItemInput’.”,
mutation {
productCreate(input: {
handle:"aaa35daa",
bodyHtml:"ddf35dd",
descriptionHtml:"eee35e",
tags:"dddd, eee,ggg",
title:"1111Buarton",
vendor:"Burton",
options: ["Size", "Color"],
seo:{
description:"ttt",
title:"eeee"
},
variants: [
{
price:"111",
inventoryItem: [
{
cost: "0.00",
tracked: true
}]
inventoryQuantities: [
{
availableQuantity: 3,
locationId: "gid://shopify/Location/62087659605"
}]
weight:1,
sku: "4444345444",
options: ["S", "Rainbow"]
},
]
published: true
}
) {
product {
id
}
userErrors {
field
message
}
}
}