App reviews, troubleshooting, and recommendations
Hello Shopify Community,
I am working on creating products using the productCreate and productVariantsBulkCreate mutations in the 2024-07 version of the GraphQL API. However, I am running into an issue where the process doesn't work as expected.
If anyone has faced a similar issue or knows a better way to handle this, I would appreciate your guidance.
Thank you in advance for your help!
In addition to it, here are mutation I am using for 2024-07,
mutation productVariantsBulkCreate($productId: ID!, $variants: [ProductVariantsBulkInput!]!) { productVariantsBulkCreate(productId: $productId, variants: $variants) { userErrors { field message } product { id title options { id name values position } } productVariants { id title selectedOptions { name value } compareAtPrice createdAt inventoryPolicy inventoryQuantity position price barcode taxable updatedAt inventoryItem { id measurement { weight { unit value } } requiresShipping sku tracked } } } }
and
mutation CreateProduct($product: ProductInput!, $media: [CreateMediaInput!]!) { productCreate(media: $media, input: $product) { product { id: legacyResourceId productType status vendor title description metafields(first: 250) { edges { node { id key value type namespace } } } options { id name position values optionValues { id name hasVariants } } media(first: 10) { edges { node { id mediaContentType } } } } userErrors { field message } } }
have you tried productVariantUpdate mutation after product creation? and pass first variant from creation response?
Also check these mutations
inventoryActivate({
})
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