Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

After creating a product how can I publish it to the online store?

After creating a product how can I publish it to the online store?

Wakil_eFoli
Shopify Partner
47 2 6

I'm creating new product using the productCreate mutation. Now I want to publish it to my online store.

To do that I'm querying the list of publications using the publications query but the challenge I'm facing is to determine which publication id belongs to the online store? Previously they had a "name" property which is now deprecated. 

 

Once I become certain that this id belongs to the online store then I can publish it using the publishablePublish mutation.

Also how can I set the inventory quantity of a newly created product?

Thanks! 

 

Replies 2 (2)

websensepro
Shopify Partner
1288 145 166

hi, @Wakil_eFoli 

websensepro_0-1700120085821.png

 

websensepro_1-1700120091131.pngwebsensepro_2-1700120097097.png

 

Need a Shopify developer?
Hire us at WebSensePro
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel or buy us a Cofee here

Free Shopify Beginner Tutorial
Wakil_eFoli
Shopify Partner
47 2 6

I don't see anything relevant to my question i.e. publication or inventory.