Hey all, I’m trying to filter the products variants of my collections using the filters and variantOption properties. I have been following this guide from the official doc https://shopify.dev/docs/custom-storefronts/building-with-the-storefront-api/products-collections/filter-products#query-products-by-variant-options and this is the query I’m testing to fetch my data
query getCollection($idCollection: ID) {
collection(id: $idCollection) {
id
title
products(
first: 10
filters: { variantOption: { name: "Color", value: "Black" } }
) {
edges {
node {
id
title
description
totalInventory
variants(first: 5) {
edges {
node {
id
title
price {
amount
}
compareAtPrice {
amount
}
selectedOptions {
name
value
}
}
}
}
featuredImage {
url
}
}
}
}
}
}
However, in my response, I get all the product variants and not just the one that I’m filtering with the variant options. I just want to know if there is something missing in my query or if there is some other way to achieve this.