Why isn't this product query working?

I have a product metafield custom.roomvo, it’s a boolean field, I’m trying to query all products where it’s set to true. Here’s what I have for the query:

query RoomvoProducts {
products(first: 50, query: "metafields.custom.roomvo:true") {

}
}

This is returning 0 results. Why?

Hey @ctevan!

Shopify’s product search syntax does not support filtering by metafeilds, so metafields.custom.roomvo:true is simply ignored which is why you get 0 results.

The query parameter only works with indexed fields like title, vendor, tag, etc.

To filter by a metafield, you must either:

  • Fetch products first and filter client-side, or

  • Use the Storefront API with a metafield filter, or

  • Store the value in a tag (e.g. roomvo:true) and query by that tag.

So the query isn’t wrong, it’s just not supported by Shopify’s Admin API search.

Actually, you can filter by MF:
https://shopify.dev/docs/api/admin-graphql/latest/queries/products#argument-query-filter-metafields.{namespace}.{key}

and the query looks right.

Only thing which comes to mind is this when defining MF:

And how do i filter by tags? this is still giving zero results:

query RoomvoProducts {
products(first: 50, query: “tags:Roomvo”) {

}
}

Also tried tag:Roomvo

Sounds similar to this: Filtering products in a collection by tag · Shopify/hydrogen · Discussion #490 · GitHub

Test queries t in shopify’s graphiql app, before trying to roundtrip everything through flow:

Unless it’s the forum software bungling text make sure your using ACTUAL straight quotes: " "
Don’t blindly copy stuff out of code generators, and especially don’t copy things out of microsoft word/excel with formatting.

Also, it’s not

But

query: "tag:Roomvo"

See https://shopify.dev/docs/api/admin-graphql/latest/queries/products#argument-query-filter-tag

And yes, watch the quotes when copy/pasting. And yes again for GraphiQL app.

Code like this works fine for me:

query MyQuery {
  products(first: 10, query: "tag:Auto") {
    nodes {
      id
      title
}}}

No, this is different – this one is general products query, why link refers to the specific storefront API functionality collectionsproducts which works together with “Search & Deiscovery” app.
https://shopify.dev/docs/api/storefront/2025-04/queries/collection#returns-Collection.fields.products.arguments.filters
Admin API does not seem to have this which makes sense because of app dependency.

As i said earlier I tried tag:Roomvo as well.

I saw that.
My point is – if it worked for me, then it should work for you too and the problem is somewhere else which we can’t pinpoint because we only have information you gave us.
Also – metafield query works for me too.