Can I get multiple product variants of different products?

Solved
sillycube
Shopify Partner
776 17 124

I know that I can get multiple variants under a product. What about variants from different products?

I need to do so to generate a custom product for bulk orders. Now, I can only use for loop to get variants one by one, which is very slow. And I cannot get more variants say 40 to 60. 

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview
Accepted Solution (1)

Accepted Solutions
sillycube
Shopify Partner
776 17 124

This is an accepted solution.

Yes, here it is: https://shopify.dev/api/admin-graphql/2021-10/queries/productVariants#examples-Get_multiple_product_...

 

Not sure if it's added recently or I omitted this part. Anyway, it works.

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview

View solution in original post

Reply 1 (1)
sillycube
Shopify Partner
776 17 124

This is an accepted solution.

Yes, here it is: https://shopify.dev/api/admin-graphql/2021-10/queries/productVariants#examples-Get_multiple_product_...

 

Not sure if it's added recently or I omitted this part. Anyway, it works.

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview