Anchor to collectionPublishcollection
collectionPublish
mutationDeprecated
Requires access scope. Also: The user must have a permission to publish a collection.
Publishes a collection to a channel. Use instead.
Anchor to Arguments
Arguments
- Anchor to inputinput•Collection
Publish requiredInput! Specify a collection to publish and the sales channels to publish it to.
Was this section helpful?
Anchor to CollectionPublishPayload returnsCollectionPublishPayload returns
- Anchor to collectioncollection•
The published collection.
- Anchor to collectionPublicationscollection•
Publications The channels where the collection has been published.
- 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 collectionPublish($input: CollectionPublishInput!) {
collectionPublish(input: $input) {
collection {
# Collection fields
}
collectionPublications {
# CollectionPublication 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 CollectionPublishInput {
collectionPublications: [CollectionPublicationInput!]!
id: ID!
}
input CollectionPublicationInput {
channelHandle: String
channelId: ID
publicationId: ID
}