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
1mutation collectionUnpublish($input: CollectionUnpublishInput!) {2 collectionUnpublish(input: $input) {3 collection {4 # Collection fields5 }6 shop {7 # Shop fields8 }9 userErrors {10 field11 message12 }13 }14}
Input
1{2 "input": {3 "collectionPublications": [4 {5 "channelHandle": "<your-channelHandle>",6 "channelId": "gid://shopify/<objectName>/10079785100",7 "publicationId": "gid://shopify/<objectName>/10079785100"8 }9 ],10 "id": "gid://shopify/<objectName>/10079785100"11 }12}
{
"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
}