Regarding: “Publishes a resource to current channel.”
What are they referring to with “current channel”, and how would I find out what my current channel is?
thanks,
Ron
Regarding: “Publishes a resource to current channel.”
What are they referring to with “current channel”, and how would I find out what my current channel is?
thanks,
Ron
I asked the .dev Assistant and this is what it provided, which makes sense to me…
The current channel is determined by the API context and is not explicitly set through a GraphQL mutation or query. Instead, it is inferred from the environment in which the API request is made. For example, if you are using a sales channel app, the current channel would be the channel associated with that app.
So it depends where you are making the call from.
Thanks Rob,
I think I understand. My app does not create a sales channel app. My app is just working with the stock “Online Store” channel. Looking to “publish/unpublish” products to the Shopify’s “Online Store” channel. This was pretty easy with REST, but it appears to be a bit more complicated with GraphQL.
I started testing with publishablePublish, but the issue is (with this mutation) you need the “Online Stores” PublicationID. Hopefully I’ll be able to query this to get the specific ID for the stock “Online Store”. I’m not sure how REST handled this, as you didn’t need to specify a publication (just defaulted to the stock Online Store, I guess). If publishablePublish/publishableUnpublish are my only options, it brings up a question: If I capture/store the Online Store’s publicationID (for future use in calls) and the client (for some crazy reason) deletes the stock Online Store, and then re-creates a new one, now my mutations would stop working? I would think Shopify would prevent users from “uninstalling” the stock Online Store (but it appears to be an option)? Not sure if anything I’m saying is correct
thanks,
Ron