It should be pretty simple. You can even achieve this just by overwriting the template.
Just copy the content of magento/module-catalog/view/frontend/templates/product/list/items.phtml in to your theme YourTheme/Magento_Catalog/templates/product/list/items.phtml and then change the logic for this $block->getItems():
/** @var \Magento\...
I think what you're trying to achieve here is you're trying to add a configurable product (not simple like in your example) in a grouped product. You can't change a product attribute in a simple product (if the simple product has the color red then it will only be red). And as far as I know, natively, you can't add configurable products in group products (...
In Magento every colour variations are treated separate product. That's why it is so handy to create the group/bundle products.
Simply go to group product create page and in the grouped products section, add products as you want and set the qty.
Hope this helps.
You will need to create configurable products with these colour variations first and then ...
Your query is fine. I have copied it locally and I have results.
So, I would look at your Magento system trying to remove the graphql from the equation.
For instance, go to your Magento backend, fetch the url-key for the category 5. Then hit in your browser the category url.
I suspect you won't have products either. Then, to resolve this, you may look at ...
Create a new product attribute and then filter it out thought that attribute
Example - Attrubute name as home_page_slider (1 = enable /0 = disable [default])
then in collection