Anchor to collectionUnpublishcollection
collectionUnpublish
mutationDeprecated
Requires access scope. Also: The user must have a permission to unpublish a collection.
Unpublishes a collection. Use instead.
Anchor to Arguments
Arguments
- Anchor to inputinput•Collection
Unpublish requiredInput! Specify a collection to unpublish and the sales channels to remove it from.
Was this section helpful?
Anchor to CollectionUnpublishPayload returnsCollectionUnpublishPayload returns
- Anchor to collectioncollection•
The collection that has been unpublished.
- Anchor to shopshop•Shop!non-null
The shop associated with the collection.
- Anchor to userErrorsuser•
Errors [UserError!]! non-null The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
mutation collectionUnpublish($input: CollectionUnpublishInput!) {
collectionUnpublish(input: $input) {
collection {
# Collection fields
}
shop {
# Shop fields
}
userErrors {
field
message
}
}
}
Input
{
"input": {
"collectionPublications": [
{
"channelHandle": "<your-channelHandle>",
"channelId": "gid://shopify/<objectName>/10079785100",
"publicationId": "gid://shopify/<objectName>/10079785100"
}
],
"id": "gid://shopify/<objectName>/10079785100"
}
}
{
"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
}