Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hi. I am trying to filter out products in a given collection by their `productType`
Here is an example query:
query collectionByHandle($first: Int!, $after: String, $filters: [ProductFilter!], $handle: String!) {
collectionByHandle(handle: $handle) {
id
handle
title
description
updatedAt
products(first: $first, after: $after, filters: $filters) {
pageInfo {
hasNextPage
hasPreviousPage
}
edges {
cursor
node {
id
handle
title
vendor
productType
}
}
}
}
}
And here are the variables I am passing to it:
"variables": {
"first": 20,
"handle": "baby",
"filters": [
{
"productType": "Baby Food"
}
]
}
The products I get back, however, are filtered by collection ("baby"), but contain a mix of productTypes (both Baby Food and other items)
Any help identifying what I am doing incorrectly here would be appreciated!