Anchor to publicationCreatepublication
publicationCreate
mutation
Requires access scope. Also: The user must have a permission to create and edit catalogs.
Creates a publication.
Anchor to Arguments
Arguments
- Anchor to inputinput•Publication
Create requiredInput! The input fields to use when creating the publication.
Was this section helpful?
Anchor to PublicationCreatePayload returnsPublicationCreatePayload returns
- Anchor to publicationpublication•
The publication that's been created.
- Anchor to userErrorsuser•
Errors [PublicationUser non-nullError!]! The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
1mutation publicationCreate($input: PublicationCreateInput!) {2 publicationCreate(input: $input) {3 publication {4 # Publication fields5 }6 userErrors {7 field8 message9 }10 }11}
Input
1{2 "input": {3 "autoPublish": true,4 "catalogId": "gid://shopify/<objectName>/10079785100",5 "defaultState": ""6 }7}
{
"input": {
"autoPublish": true,
"catalogId": "gid://shopify/<objectName>/10079785100",
"defaultState": ""
}
}
input PublicationCreateInput {
autoPublish: Boolean
catalogId: ID
defaultState: PublicationCreateInputPublicationDefaultState
}