feat: filter by product meta field

Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
Chloe
2024-05-06 21:59:17 +07:00
parent 0eba468825
commit 305fe3d458
14 changed files with 241 additions and 28 deletions

View File

@@ -41,14 +41,26 @@ export const getCollectionProductsQuery = /* GraphQL */ `
$handle: String!
$sortKey: ProductCollectionSortKeys
$reverse: Boolean
$filters: [ProductFilter!]
) {
collection(handle: $handle) {
products(sortKey: $sortKey, reverse: $reverse, first: 100) {
products(sortKey: $sortKey, filters: $filters, reverse: $reverse, first: 100) {
edges {
node {
...product
}
}
filters {
id
label
type
values {
id
count
input
label
}
}
}
}
}