Anchor to publicationUpdatepublication
publicationUpdate
mutation
Requires access scope. Also: The user must have a permission to create and edit catalogs.
Updates a publication.
Anchor to Arguments
Arguments
- •ID!required
The ID of the publication to update.
- Anchor to inputinput•Publication
Update requiredInput! The input fields to use when updating the publication.
Was this section helpful?
Anchor to PublicationUpdatePayload returnsPublicationUpdatePayload returns
- Anchor to publicationpublication•
The publication that's been updated.
- Anchor to userErrorsuser•
Errors [PublicationUser non-nullError!]! The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
1mutation publicationUpdate($id: ID!, $input: PublicationUpdateInput!) {2 publicationUpdate(id: $id, input: $input) {3 publication {4 # Publication fields5 }6 userErrors {7 field8 message9 }10 }11}
Input
1{2 "id": "gid://shopify/<objectName>/10079785100",3 "input": {4 "autoPublish": true,5 "publishablesToAdd": [6 "gid://shopify/<objectName>/10079785100"7 ],8 "publishablesToRemove": [9 "gid://shopify/<objectName>/10079785100"10 ]11 }12}
{
"id": "gid://shopify/<objectName>/10079785100",
"input": {
"autoPublish": true,
"publishablesToAdd": [
"gid://shopify/<objectName>/10079785100"
],
"publishablesToRemove": [
"gid://shopify/<objectName>/10079785100"
]
}
}
input PublicationUpdateInput {
autoPublish: Boolean
publishablesToAdd: [ID!]
publishablesToRemove: [ID!]
}