Skip to content

How to filter products by facet values? #2354

Answered by michaelbromley
alphonso06 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

Your observations are correct - the products query does not include the ability to filter by facet value, only the search query has that functionality out of the box.

Although the search query does not include the facet value names, you can get access to them via the facetValues field on the search response type. Here's some docs that show this: https://beta-docs.vendure.io/guides/storefront/listing-products/#faceted-search

Here's a live demo of a faceted search: https://stackblitz.com/edit/vendure-docs-faceted-search

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by alphonso06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants