Impossible to map Product variant to Product Image

Hi,

In REST API on images response we have variant_ids returned and It is really really useful: Screenshot by Lightshot

In GraphQL we do not have that so we tried mapping manually and even after that - we cannot map them as GraphQL image returns MediaImage or ImageSource and Variant returns ProductImage GID.

Can we get the variant IDS on product images like we did in REST ?

I can see that variants now feature a connection with media as well. Maybe you could make the matches from the product media with the corresponding product variant media?

2 Likes

I see I could get the result, but now the issue of mapping is that If I want to map product images to variants takes so long that it still becomes unusable. The query cost of getting variant information including media becomes too high.

And all we need is the information to which variants the image is attached to.