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!
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025