publishablePublishToCurrentChannel mutation
Publishes a resource to current channel. If the resource is a product, then its status must be active. Products that are sold exclusively on subscription (requiresSellingPlan: true) can be published only on online stores.
Required access
write_product_listings access scope.
On this page
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
mutation publishablePublishToCurrentChannel($id: ID!) { publishablePublishToCurrentChannel(id: $id) {} } { “id”: “Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE=” }
<font style="color:#1F61A0;">publishable</font> <font style="color:#555555;">{</font><font style="color:#1F61A0;">availablePublicationCount</font><font style="color:#1F61A0;">publicationCount</font><font style="color:#1F61A0;">publishedOnCurrentPublication</font><font style="color:#555555;">}</font><font style="color:#1F61A0;">shop</font> <font style="color:#555555;">{</font><font style="color:#1F61A0;">id</font><font style="color:#555555;">}</font><font style="color:#1F61A0;">userErrors</font> <font style="color:#555555;">{</font><font style="color:#1F61A0;">field</font><font style="color:#1F61A0;">message</font><font style="color:#555555;">}</font>
Arguments
| Argument | Description |
|---|---|
id( [ID!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01)) REQUIRED |
The resource to create or update publications for. |
Return fields
- publishable (
[Publishable](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/publishable))
Resource that has been published. - shop (
[Shop!](https://shopify.dev/docs/admin-api/graphql/reference/store-properties/shop))
The user’s shop. - userErrors (
[[UserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/usererror))
List of errors that occurred executing the mutation.
