GraphQL: How do I get all product variants by product ID for each product?

RaviAmbasana
New Member
1 0 0

Hi, I am trying to get product variants for a product using the product ID. I am querying the `productVariants` and my query looks like this:

{
  productVariants(first:10 ) {
    edges {
      node {
        id
        product {
          id
        }
      }
    }
  }
}

I want to get only the product variants that match a particular product id. How can I do that?

0 Likes