getFilters
Fetches filters data.
This method sends a GET request to the getFilters endpoint of the Vue Storefront API Middleware. In turn, it receives data from the BigCommerce getFilters GraphQL API.
Signature
declare function getFilters$1(
props: GetFiltersParameters,
options?: MethodOptions
): Promise<GraphQL.SearchProductFilterConnection>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
props | Required | GetFiltersParameters | Parameter object which can be used with this method. Refer to its type definition to learn about possible properties. |
options | Optional | MethodOptions |
Returns
Returns a response with the filters data
Referenced Types
- GetFiltersParameters
SearchProductFilterConnection
Examples
Fetching filters data. Sending it this way, the response can be cached safely.
import { sdk } from '~/sdk.config.ts';
const filtersResponse = await sdk.bigcommerce.getFilters({
filters: {
categoryEntityId: 1
},
first: 10
})