A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
trying to run the following query:
mutation {
bulkOperationRunMutation(
mutation: "mutation call($media: [CreateMediaInput!]!, $productId: ID!) { productCreateMedia(media: $media, productId: $productId) { media { alt mediaContentType status } mediaUserErrors { field message } product { id title } }}"
stagedUploadPath: "xxxxx"
) {
bulkOperation {
id
url
status
}
userErrors {
message
field
}
}
}
results in the error:
"Please Pass A Whitelisted Mutation Name"
after searching around I found examples of others needing to reach out to support to get their mutation enabled for bulk operations. Can someone confirm productCreateMedia mutation can be run in bulk?
Hi @TorqIT-Dev,
You are correct - the mutation you are trying to run does not fall on the allow list for Bulk Operations which is generating this error message. You can find more on the calls you can perform on this list from our developer documents.
We've also submitted feedback to our developer teams to alter the messaging to be more user friendly to identify.
Hope that helps!
Thanks
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
OK, but, is there any way to bulk load ExternalMedia? I need to add one to a set of Products each. I also need to run productReorderMedia to make the ExternalMedia the first asset. Can I import a CSV w/ URLs? I know that Matrixify does not support video Media. So, what do we do?
BTW - Matrixify will support Product Media soon, we are working on that now.
It's going to be a large and painful change (also for Merchants), because we switch to the new Media GraphQL API that will make work with Product Media slower, but on the benefit side - you will be able to export and import all the supported Media types.
Should be live any week now... 🤞
@Marisis it live or any ETA? When can we use this feature to bulk import products with images using GraphQL API?
Hello, @MohitT !
Sorry for forgetting about this thread - yes, it's live now.
You can Export & Import all the media types as in Admin:
@Maris Do you know how we can bulk import products using bulkOperationRunMutation: productCreate? When I pass CreateMediaInput it gets error "
Sorry, @MohitT - we are not using the bulkOperations API in Matrixify, have played with it long time ago, but it is too limiting for us, so are not taking that route. That error sounds like that very reason, because if I remember correctly - it can work with just 1 nested level of related data. 🤔