Search query using attribute hasVariantsThatRequires.. does not work

Hello,

I’m trying to use the new field hasVariantsThatRequiresComponents as a search filter in the graphql version 2025-04 but is not working.

The query:

products(first: 5, query: "has_variants_that_requires_components:true") {
    nodes {
      id
      title
      hasVariantsThatRequiresComponents
    }
  }

return components with hasVariantsThatRequiresComponents being false.

I have tried some other queries like:

has_variants_that_requires_components:true
has_variants_with_components:true
hasVariantsThatRequiresComponents:true

But none works, the results are always the same, products with hasVariantsThatRequiresComponents being false ( it simply ignore, does not meaning it’s returning the opposite).

1 Like

Hey @overduka :waving_hand: - I did a bit of digging into this and I think the query argument should be: has_variant_with_components The field, hasVariantsThatRequiresComponents is correct though. I tried this query in 2025-04 and it worked for me:

{
  products(first: 5, query: "has_variant_with_components:true") {
    nodes {
      id
      title
      hasVariantsThatRequiresComponents
    }
  }
}

Hope this helps - let me know if you’re still seeing any issues pop up.

2 Likes

Hey @Alan_G, this works! Thank you very much!

By the way, where is this documented? I did not find any reference to it, and it differs from the attribute name, so it’s really impossible to guess.

Hey @overduka - no worries! The only spot I can see where this is documented on our end is in the query arguments section for the products query here in our docs, it is definitely a little “hidden” compared to some other filters we show in our examples for sure.