Hi,
Is there a way to mimic the behavior of REST ‘/product’ functionality w.r.t published_scope in GraphQL?
Product created with published_scope global is published on Online Store and Point of Sale (and automatically gets published to other new channels that I could create for test)
Product created with published_scope web is published only on Online Store (and automatically published to other new channels that I could create for test)
In publishablePublish, we are required to pass publicationIds. How can we categorize which publications belong to global scope only and which ones belong web scope only?
Is Point of Sales the only channel that falls under global only category?
As far as I understand it, in REST published_scope
is just for the POS and published_at
is just for the online store sales channel.
In GraphQL terms, if published_scope=global
you would pass the publicationId
for the POS channel. The publicationId
is unique to a store but you can find is by looking for the one that has the app ID equal to 129785
.
(One thing we ran into, if a store uninstall the POS app this publication will not exist on the store)
If published_at
is set in REST, the equivalent in GraphQL would be to pass the publicationId
of the publication that has the app ID equal to 580111
(online store).
Hope this helps some, let me know if you have any followup questions.
Thanks for the suggestion. Curious to know if you had to do an equivalent on publish=false (if I understand correct, when scope is web, I think we need to unpublish from all publications and if scope is global, we unpublish from all but the POS app potentially making an addition publish call for POS?)