We are building custom storefront using Shopify's Storefront API which consists of standard catalog which is mapped to collection. Based on the selected collection, the corresponding products are fetched. We would also like to build filter on top of these products. Basically, build a unique list of product types & vendors belonging to the selected collection. On selecting any of the filter value, fetch the products matching the selected filter(s) for the collection.
Using collectionByHandle query root we are able to obtain the products belonging to the collection.
- There is productTypes query root that returns the unique list of product types. But how do we scope it to the collection?
- The endpoint doesn't accept query input in its products connection. How do we get products for a collection, matching the filter?
- How can we get unique list of vendors belonging to the collection?
Is there any workaround to it?
Highly appreciate any kind of inputs. Thank you!