All things Shopify and commerce
Hi! I am new to graphQL and I have been having some trouble with the bulkOperationRunMutation when using it with productVariantsBulkUpdate. I am getting this error when trying to upload my products' variants. I followed the bulkMutationRunMutation steps aswell, similar to what I did when bulk uploading the initial products.
Here is the block I'm trying to post (with %s being the upload path):
mutation { bulkOperationRunMutation( mutation: "mutation CreateProductVariants($productId: ID!, $variants: [ProductVariantsBulkInput!]!) { productVariantsBulkCreate(productId: $productId, variants: $variants) { productVariants { id title selectedOptions { name value } } userErrors { field message } } } ", stagedUploadPath: "%s") { bulkOperation { id status } userErrors { message field } } }
And here is the error I am receiving:
{'data': {'bulkOperationRunMutation': {'bulkOperation': None, 'userErrors': [{'message': 'You must use an allowed mutation name.', 'field': ['mutation']}]}}, 'extensions': {'cost': {'requestedQueryCost': 10, 'actualQueryCost': 10, 'throttleStatus': {'maximumAvailable': 2000.0, 'currentlyAvailable': 1990, 'restoreRate': 100.0}}}}
Is there something wrong with my syntax, or is productVariantsBulkUpdate just not allowed to be used with bulkOperationRunMutation? If the latter is the case, how would I go about bulk creating multiple variants for multiple products?
Any help is appreciated!
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025