How do I could get list of attributes to show it like filter options of products list?

Hello!

We are niewbie in Pimcore and now are trying to configure Pimcore so to use it at different outcome chanels.

So, please help up with such question - how could we get list of attributes to show it like filter options of products list on front-end?

For example, PIM demo shows on front-end in each category predifened filters in Filter Definition. We don’t understand how to get this list of filters options in API or in GraphQL (datahub).

So we need to get by API or GraphQL information like:

  1. List of products of selected category
  2. List of possible attributes of these products to filter the list of product

We suspect that filter definition is intended exactly for this, but we didn’t get how to configure and use it correctly…
Or maybe there is another way through graphql querries…?

Please help us!