I’m trying to query all products in a collection by a metafield value. This seems to be possible with the storefront api according to this page.
https://shopify.dev/api/examples/filter-products#query-products-by-metafield-value
I created a product metafield of true / false type. The following query returns all products, no matter what I put as the value. What am I doing wrong?
query exampleFilteredQuery {
collection(handle: "filterable-collection") {
handle
products(first: 25,
filters: {
productMetafield:{
namespace:"my_namespace",
key:"my_metafield_key",
value:"true"
}
}) {
edges {
node {
id
title
}
}
}
}
}