A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hello,
I'm trying to publish a product to all sales channels (including Facebook) but there's no option in graphql for that. From what I've searched, there's no implementation for that. Is it possible? Does anyone succeed on this matter?
Solved! Go to the solution
This is an accepted solution.
Thank you for your reply.
It is indeed the solution.
First, get the channels list:
Then call 'publishablePublish':
Thank you for the help.
Hey @joao_a_costa
You might like to look into the publishablePublish mutation (docs) which will publish a resource to a channel. Worth noting that the write_publications scope required to run the mutation is currently available only to private apps installed on Shopify Plus stores. Hope that helps!
This is an accepted solution.
Thank you for your reply.
It is indeed the solution.
First, get the channels list:
Then call 'publishablePublish':
Thank you for the help.
@joao_a_costa did this really work for you? As when I run the first graphql it only returns the channelID but I no where see I publicationID in the response.
is this only for plus store?
Hi Anthony,
Read the channel id in the result:
And set that id on the request on the graphql variables:
The Channel ID is the same as the Publication id, just change the content type in the GID from "Channel" to "Publication" to use it in this mutation.
gid://shopify/Channel/1234567890
gid://shopify/Publication/1234567890