Hi everyone,
I’m encountering an issue with the ProductSet mutation in Shopify’s 2024-07 API when trying to create products that include associated media files uploaded via the fileCreate mutation. The problem only occurs when I try to create three or more similar products with minimal attributes.
Workflow:1. I upload media files using the fileCreate mutation.
- I poll the API until the images have a status of READY.
- I use the ProductSet mutation to create the products, including the media IDs.
Example Payload:
{
"input": {
"mediaIds": ["gid://shopify/MediaImage/26260547272792"],
"title": "gio",
"status": "DRAFT",
"variants": [{
"optionValues": [{ "optionName": "Title", "name": "Default Title" }],
"price": 0
}]
}
}
Issue:
When submitting three or more similar products, some succeed while others fail with the error:
{
"userErrors": [
{
"field": ["input"],
"message": "Something went wrong, please try again."
}
]
}
Additional Details:- The issue persists even after ensuring the media files are fully processed (READY status) before attaching them to the product.
- When I retry the failed product creations, they succeed.
- The error only happens when attempting to upload three or more similar products.
Has anyone experienced something similar or found a workaround for this?
Any help would be appreciated!
Context:
- API Version: 2024-07
- Product creation: ProductSet mutation
- Media upload: fileCreate mutation