Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello Community,
I’m currently working on updating product data using Shopify GraphQL API version 2024-07. Previously, in version 2024-01, we managed to handle most updates using a single mutation. However, with the recent changes in the new version, it seems that some fields now require separate mutations (e.g., variants, metafields, inventory).
Here are the fields we regularly update:
Our Current Approach (2024-01 Version):
mutation UpdateProduct($product: ProductInput!, $variantCount: Int!) {
productUpdate: productUpdate(input: $product) {
product {
id: legacyResourceId
metafields(first: 250) {
edges {
node {
id
key
value
type
namespace
}
}
}
variants(first: $variantCount) {
edges {
node {
id: legacyResourceId
title
}
}
}
}
userErrors {
field
message
}
}
}
Challenges with 2024-07 Version:
Proposed Solution: I am considering breaking updates into three separate mutations:
Could anyone suggest the most efficient way to handle these updates with minimal mutation calls? If there are optimizations we might have missed, I’d love to hear them!
Thanks in advance!
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024