Hi, I am trying to fetch products through the Storefront API by filtering using a product tag, however the fetched products do not match the submitted filters.
- Store front api version used: 2025-01
- Query used: collection - Storefront API
- Product filter input objet in docs: https://shopify.dev/docs/api/storefront/latest/input-objects/ProductFilter
Query
query getCollection($id: ID!, $filters: [ProductFilter!]) {
collection(id: $id) {
title
products(first: 3, sortKey: COLLECTION_DEFAULT, filters: $filters) {
nodes {
id
title
tags
}
}
}
}
Variables
{
"id": "gid://shopify/Collection/285546676313",
"filters": [
{
"tag": "Elements"
}
]
}
Response
{
"data": {
"collection": {
"title": "beron_test_collection_bassol_1",
"products": {
"nodes": [
{
"id": "gid://shopify/Product/7885115523161",
"title": "BRACELET HÏ 24",
"tags": [
"2024"
]
},
{
"id": "gid://shopify/Product/7885115621465",
"title": "ELECTRIC VISIONS T-SHIRT",
"tags": [
"2024",
"Camisetas",
"Elements",
"Hombre",
"Tees",
"with-stock"
]
},
{
"id": "gid://shopify/Product/7885115654233",
"title": "ELECTRIC VISIONS LAVANDER",
"tags": [
"2024",
"Camisetas",
"Elements",
"Hombre",
"Tees"
]
}
]
}
}
}
}
As you can see, product in the index 0 from nodes object doesn’t contains the filtered tag Elements but is being returned by the response, i have tried applying different filters and all of them seems to work properly except the one for product tags.
¿Is this a bug? or is there something that i am missing.
Thanks!