Re: Storefront API: products filtering

Storefront API: products filtering

2 0 2

I am developing a mobile app integrated with Shopify via Storefront API.
Now I have troubles with implementing product filters.
Could you please help me by answering the following questions:
1) How can I get a list of all products options in a selected collection? This is a problem because we have to send a connection argument (for example, "first" or "last"), which only allows to select options of a part of products
2) How can I query products by selected filter options
3) There is a problem with querying product variants by selected options. Using the "variantBySelectedOptions" field gives only one Variant as a result and selected options have to match selected options of a returned variant. Is there any way to get a list of variants by one of selected options?

Reply 1 (1)

Shopify Partner
67 12 26

Not really, I think the closest you're going to get is filtering by tags using the query option when fetching products. If you need more advanced search it may be worth looking a separate search platform and building your own index for all variant options.