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
mutation publicationUpdate($id: ID!, $input: PublicationUpdateInput!) {
publicationUpdate(id: $id, input: $input) {
publication {
# Publication fields
}
userErrors {
field
message
}
}
}
Input
{
"id": "gid://shopify/<objectName>/10079785100",
"input": {
"autoPublish": true,
"publishablesToAdd": [
"gid://shopify/<objectName>/10079785100"
],
"publishablesToRemove": [
"gid://shopify/<objectName>/10079785100"
]
}
}
{
"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!]
}