Hi,
I am working on an app that’s imports and updates my Shopify Store Products from another source. While creating, I realized that i need to set my location_id property to update my product’s stocks , also i have multiple locations in my shop.Shared code below;
mutation {
productCreate(
input: {
handle: "handle"
bodyHtml: "bodyHtml"
descriptionHtml: "descriptionHtml"
tags: "tags, tags,tags"
title: "title"
vendor: "vendor"
options: ["Size", "Color"]
variants: [
{
price: "111"
weight: 1
sku: "4444444"
options: ["S", "Rainbow"]
inventoryQuantities: [
{ availableQuantity: 66, locationId: 65888846010 }
]
}
]
published: true
}
) {
product {
id
}
userErrors {
field
message
}
}
}
without “inventoryQuantities” property under “variants” , code work perfectly, creates my new product and returns productid as response. When i add “inventoryQuantities” in mutation , returns
Invalid global id '65888846010'
I just followed Shopify’s GraphQL API Guide and used “locationId” from one of my Shopify Store Locations
Thank you in advance for your help.