Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Storefront API: products filtering

Storefront API: products filtering

azaika
Visitor
2 0 3

Hello!
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)

c10s
Shopify Partner
67 12 27

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.