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
mutation publicationCreate($input: PublicationCreateInput!) {
publicationCreate(input: $input) {
publication {
# Publication fields
}
userErrors {
field
message
}
}
}
Input
{
"input": {
"autoPublish": true,
"catalogId": "gid://shopify/<objectName>/10079785100",
"defaultState": ""
}
}
{
"input": {
"autoPublish": true,
"catalogId": "gid://shopify/<objectName>/10079785100",
"defaultState": ""
}
}
input PublicationCreateInput {
autoPublish: Boolean
catalogId: ID
defaultState: PublicationCreateInputPublicationDefaultState
}