Anchor to section titled 'undefined'

publicationUpdate
mutation

Requires write_publications access scope. Also: The user must have a permission to create and edit catalogs.

Updates a publication.


Anchor to id
id
required

The ID of the publication to update.

The input fields to use when updating the publication.


Was this section helpful?

The publication that's been updated.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation publicationUpdate($id: ID!, $input: PublicationUpdateInput!) {
  publicationUpdate(id: $id, input: $input) {
    publication {
      # Publication fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "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!]
}