publishableUnpublishToCurrentChannel mutation
Unpublishes a resource from the current channel. If the resource is a product, then its status must be active.
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 publishableUnpublishToCurrentChannel($id: ID!) { publishableUnpublishToCurrentChannel(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 delete or update publications for. |
Return fields
- publishable (
[Publishable](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/publishable))
Resource that has been unpublished. - 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.
