Hey @Benny_Chan , no problem, appreciate you following up. I did a bit more testing, and found a method that may work as a workaround.
You should be able to fetch more than 20 variants in a single request by using the nodes(ids: [ID!]!) pattern in the Storefront API and passing an array of variant GIDs as your variables.
In my testing, this scales pretty well for dozens of variants, and you can always batch into multiple calls if you’re working with very large sets to stay within GraphQL cost limits. I’ve got a quick example below that shows the exact query and a fairly large variables payload:
query VariantAvailability($ids: [ID!]!) {
nodes(ids: $ids) {
... on ProductVariant {
id
title
quantityAvailable
availableForSale
}
}
}
Variables:
{ "ids": [ "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here",
"gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here", "gid://shopify/ProductVariant/variant-here" ] }
Hope this helps as always, let me know if I can clarify anything on my end here 