How to make nested RQL request

67 Views Asked by At

I have a Dyn Admin repository with 2 descriptors: sku and product.

Could you please give an advice how to make nested RQL request, where I search for ids that returns from other RQL?

Something like this:

<query-items item-descriptor="sku" id-only="false">
id IN {
  <query-items item-descriptor="product" id-only="false">
    parentCategories CONTAINS "cat"
  </query-items>
  }
</query-items> 
1

There are 1 best solutions below

0
pantuptus On BEST ANSWER

Nesting is not supported but if skus that you are querying in an outer query, are child skus of the products of the inner query, then probably you can use the following:

<query-items item-descriptor="sku" id-only="true">parentProducts includes item (parentCategories CONTAINS "cat")</query-items>