Anchor to section titled 'undefined'

collectionUnpublish
mutation
deprecated

Requires write_publications access scope. Also: The user must have a permission to unpublish a collection.

Unpublishes a collection. Use publishableUnpublish instead.


Specify a collection to unpublish and the sales channels to remove it from.


Was this section helpful?

The collection that has been unpublished.

The shop associated with the collection.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation collectionUnpublish($input: CollectionUnpublishInput!) {
  collectionUnpublish(input: $input) {
    collection {
      # Collection fields
    }
    shop {
      # Shop fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "input": {
    "collectionPublications": [
      {
        "channelHandle": "<your-channelHandle>",
        "channelId": "gid://shopify/<objectName>/10079785100",
        "publicationId": "gid://shopify/<objectName>/10079785100"
      }
    ],
    "id": "gid://shopify/<objectName>/10079785100"
  }
}
input CollectionUnpublishInput {
  collectionPublications: [CollectionPublicationInput!]!
  id: ID!
}

input CollectionPublicationInput {
  channelHandle: String
  channelId: ID
  publicationId: ID
}