Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
Hello Shopify Geek,
I recently created a bulk operation where I specified that I want to fetch only the first product image. However, after the bulk operation finished and I fetched the data, I noticed that I am getting multiple product images instead. I am having trouble identifying the issue and need some assistance.
Has anyone experienced a similar problem? Any ideas on what could be causing this issue and how to resolve it? I appreciate any insights or suggestions. Thank you!
Here is the sample query:
products { edges { node { id legacyResourceId description title productType images(first: 1) { edges { node { id url(transform: { maxWidth: 300, maxHeight: 300 }) originalSrc } } } } } }
Hi @nahid 👋
Paginating query parameters are optional in bulk operations, so the image connection will retrieve all images associated with the product. One option would be to use the `product.featureImage` or `product.featureMedia` if you'd like a single image per product.
Hope that helps!
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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