I’m building a Shopify store using the Storefront API.
I noticed that in the most recent version of the API (2023-01) there is now support to filter products in a collection by tag. I need to filter by tag so I can show ladies or mens products, so this feature is very useful for me.
However it doesn’t seem to be working.
When I run this query:
query {
collection(handle: "greg-norman") {
title
products(first: 30, filters: { tag: "Mens" }) {
nodes {
title
vendor
tags
}
}
}
}
I get back this data:
{
"data": {
"collection": {
"title": "Greg Norman",
"products": {
"nodes": [
{
"title": "Greg Norman Polo Umbrella Coral Guava",
"vendor": "Greg Norman",
"tags": ["G2S22K469", "Ladies", "Polo"]
}
// omitted for brevity
]
}
}
}
}
As you can see, the first product returned, doesn’t actually match the tag that I’m filtering by. Any idea if I’m doing something wrong here?