I am new to GraphQL and new to Shopify. I am having a hard time understanding how to write Bulk operation mutation.
Here is my current challenge.
mutation {
bulkOperationRunMutation(
mutation: "mutation call($id: ID!, $input: [PublicationInput!]!) {publishableUnpublish(id: $id, input: $input) { userErrors { message field } } }",
stagedUploadPath: "'. $uploadFilePath . '") {
bulkOperation {
id
url
status
}
userErrors {
message
field
}
}
}
I would appreciate if you can help answering the following :
What does the keyword
callrefers to? Is that a GraphQL keyword, or is it aninventionby Shopify.How do the argument to call [ in this case
$id: ID!, $input: PublicationInput!, relate to argument to actual mutation , in this case id:$id, input: $input
I believe part of the problem is that there are two levels of mutation , on for BulK Operation , and then one for the actual operation , in the case publishableUnpublish.
Hit the following resources with no luck
https://graphql.org/learn/queries/#mutations
https://shopify.dev/docs/api/admin-graphql/2024-01/mutations/publishableUnpublish