GraphQL ProductCreate Publish deprecated

Pandectes
Shopify Partner
51 1 14

Hello in the mutation ProductCreate the Publish is deprecated and in the docs the mutation PublishablePublish is proposed but from the documentation this is only for Shopify Plus stores. So the question that arises here is how can we publish a product to all channels without having a Plus store?

 

Please let me know if it works by giving it a like or marking it as a solution!
Pandectes GDPR Compliance - #1 GDPR app for Shopify merchants.
Pandectes - 100% Free Cookie Scanner.
Free plan available. Live Chat Support is available 24/7.
Replies 4 (4)

Luke_K
Shopify Staff
402 66 98

Hey @Pandectes 

Alas, as you had found in the GraphQL documentation, at this time it's only possible to call publishablePublish via a private app installed on a Shopify Plus store. 

Using the REST Admin API, it is possible to create a Product and publish to the Online Store and Point of Sale channel with published scope(documentation).

I acknowledge, that's not all sales channels though, and I note we have received this feedback from other partners. I've added your point for the consideration of our internal teams. Hope that helps!

| Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
Pandectes
Shopify Partner
51 1 14

Hello @Luke_K,

thank you for your reply. In the GraphQL Explorer there is no such field. This "published_scope" is a property that I can get as response but I cannot set it while creating a product. In stead of this, the field for publication is the field "publish" which is marked as deprecated and the proposed way is to use the mutation PublishablePublish which as I said is only for Shopify Plus Stores. In the Product reference page that you mentioned in the example for unpublishing a product the example mentions again the field "publish". So as the field "publish" is the only way but it is deprecated what is the final solution for this purpose? 

Thanks you

Please let me know if it works by giving it a like or marking it as a solution!
Pandectes GDPR Compliance - #1 GDPR app for Shopify merchants.
Pandectes - 100% Free Cookie Scanner.
Free plan available. Live Chat Support is available 24/7.
Luke_K
Shopify Staff
402 66 98

Hey @Pandectes 

So like you've read, you cannot publish to all sales channels without having a private app on a Plus Store with the write_publications and read_publications scopes set. There isn't another way presently - apologies if I was not clear.

In the GraphQL Admin API, The deprecated 'published' field will be eventually removed from the documentation - as you've noted it can be used to publish products to the Online Store for instance, and it's still present in the GraphQL Admin API documentation to naturally give partners/merchants a heads up about the deprecation itself and publishablePublish

The REST Admin API documentation I shared before was pointing to the REST product resource and it's 'published_scope' field.  The reason I shared that before, was purely as a workaround so that you can publish to the Online Store and Point Of Sale in REST Admin API without having to rely on a deprecated field in the GraphQL Admin API. Publishing a product in that way, won't require you to have write_publications or read_publications either.

I do concur that that this is an instance where the parity between the GraphQL Admin API and REST Admin API isn't equal and this has been noted internally. If there's any changes to the above, we'll be sure to communicate these changes via our Developer Changelog. 

 

 

 

| Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
Pandectes
Shopify Partner
51 1 14

Hello @L_J_K,

Thank you for clarifying that. At the moment all the call we make are with the graphql api and thus we have this problem. It should be very helpful if we had the same options just like in the rest admin api. I will be waiting for any updates.

 

Thank you.

Please let me know if it works by giving it a like or marking it as a solution!
Pandectes GDPR Compliance - #1 GDPR app for Shopify merchants.
Pandectes - 100% Free Cookie Scanner.
Free plan available. Live Chat Support is available 24/7.