Development discussions around Shopify APIs
Hi, I am wondering about the best way to get all new/changed product images.
I have tried graphql shop.productImages, where I can get all images created after a given cursor. That would work fine, but the query does not return the product that the image belongs to. It only returns an id like "gid://shopify/ProductImage/13313327005774". Is there any way to find the product given that id? Without the product I can not update the productImage.
Next I tried to get all products updated after a given timestamp. That triggers an update every time the stock level changes. I would need to check all images every time an item is sold, which would give a lot of unnecessary checks.
Currently I am using the bulk query to get all products and images. This works, but I suspect there is an easier way so don't have to repeatedly get all products and images?
Thanks,
Mattias
I'm interested in that too.
Hey @matobi
Have you thought about using webhooks at all? I believe image changes would fire a product update webhook.
Kevin_A | Solutions Engineer @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
User | RANK |
---|---|
16 | |
7 | |
6 | |
6 | |
5 |
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022