Query metafields value

Topic summary

A user attempted to query Shopify products filtered by metafield values using GraphQL but encountered issues with their query syntax.

Problem identified:

  • The query syntax appears corrupted or reversed in the original post
  • More critically, metafields are not currently supported as filters in the products query parameter

Official response:

  • Shopify support confirmed that metafield filtering is not available for product queries
  • Directed the user to official documentation for:
    • Available product query filters
    • Custom data and metafields overview to understand API capabilities

Status: The issue remains unresolved as the desired functionality (filtering products by metafield values) is not supported by the current GraphQL API. The user would need to explore alternative approaches, such as fetching products first and filtering metafields client-side.

Summarized with AI on November 12. AI used: claude-sonnet-4-5-20250929.

hi

i’m a newbie of shopify graphql

i try to this query in my project

but it doesn’t work

how can i do this?

query Products {
products(
first: 10
query: “metafield:value:test OR metafield:value:test-3”
) {
edges {
cursor
node {
description
handle
id
title
metafield(key: “artist_name”, namespace: “custom”) {
key
namespace
value
}
}
}
}
}

Hey @chacha_S ,

Just taking a look here, I can see that you’re using a metafield in the query field. Currently metafields are not an available filter for products queries. You can see the available queries you can use here:

As you’re just getting started with the Shopify GraphQL, I’d recommend reviewing our documentation on custom data and metafields to get an understanding on what’s possible through the API.

Hope that helps!

  • Kyle G.