Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
All I'm doing is copying the example from here and putting it into the Graphql app I have installed on my dev store. And of course it does not work. Here is the code itself:
mutation productVariantsBulkUpdate($variants: [ProductVariantsBulkInput!]!, $productId: ID!) {
productVariantsBulkUpdate(variants: $variants, productId: $productId) {
product {
cursor
}
productVariants {
cursor
}
userErrors {
code
field
message
}
}
}
And then my variables:
{
"variants": [
{
id: "gid://shopify/ProductVariant/39369514385591",
price: "50.00"
}
],
"productId": "gid://shopify/Product/6591908577463"
}
Any idea why this isn't working?
You've probably moved on by now, but for anyone else finding this...
The problem for me was the `mediaSrc` was set to `null` and that was causing an error - either omit it or set it to an empty array, and that should sort it.
Not sure if anyone from Shopify picks these things up, or if there's anywhere for us to submit bug reports, but this has absolutely consumed me for the past few days. A descriptive error message would be really helpful, as in the end I had to just delete each field line by line to see if it would make a difference. (Got there in the end)
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By