Filter does not seem to work (pwa-studio demo)
-
12-03-2021 - |
Question
I cloned pwa studio 3.0.0 and followed the instructions:
git clone https://github.com/magento/pwa-studio.git
cd pwa-studio
yarn install
MAGENTO_BACKEND_URL="https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/" yarn buildpack create-env-file packages/venia-concept
yarn run build
yarn run watch:all
The shop is running and I can change category, if I select category bottoms
and then click the filter button I get filter options. Then I select price and check $0.00 - $99.99
. When clicking apply filter
the url changes but the list of articles stays the same.
No errors in console and no XHR in network tab. The CATALOG/FILTER_OPTION/UPDATE
action is dispatched and changes are made to the state (before closing the filter slider).
I was wondering if I missed something and/or where to look to hook up the filter to the effect that gets me the data. Am I supposed to hook it up myself or is this a bug?
If I have to it myself then where would I do it, do I do it here?
update
Looks like the filter feature is not implemented. Adding a price variable to runQuery and setting it as a filter will give me filtered results.
I am not sure what the intention is of the dev team but it looks like vinia-ui will get a complete overhaul so maybe not touching it until I'm clear what the dev team intends to do with this.
Solution
This is caused because graphql part is not hooked up to configurable product.
what about filtering for things such as Fashion Material or size, etc? Those attributes are part of ConfigurableProduct but I wasn't able to filter for them. See magento/pwa-studio#1432