Hi.
New to shopify, trying to connect it to a custom middleware. I need to update products on a daily basis and update stock every 15 minutes. at the moment i have set up the product sync, but every time it is run, the stock of each product is reset to 0. is this because I don’t specify the id of the variant?
This is the first time i am working with GraphQL, I am old and this just seems so much more convoluted than the good ole REST way. But there is no good bulk update in the REST api, so I have no choice but to learn new things. Below is the query i use:
$query = 'mutation productUpdate($input: ProductInput!) {
productUpdate(input: $input) {
product {
descriptionHtml
id
status
tags
title
variants(first:1) {
edges {
node {
barcode
price
sku
weight
weightUnit
}
}
}
vendor
}
userErrors {
field
message
}
}
}';
any help or nudges in the right direction is appreciated