Hey everyone! I’m stuck on a Shopify project and could use some help. I’m trying to figure out how to get all the collections that a specific product belongs to. Like if I have a product ID for a ‘Blue Hoodie’, I want to know which collections it’s part of.
I’ve been looking at the Shopify Storefront API, but I’m not sure if it can do this or how to use it for this purpose. Does anyone know if there’s a way to do this with the API? What kind of query would I need to use? Are there any tricks to make it work?
If someone could point me in the right direction or share some example code, that would be awesome. Thanks in advance for any help!