Tags:
- Admin GraphQL API
- 2026-04
New analyticsQueryable capability for Metafield Definitions
The capability is now available on the type in the GraphQL Admin API, enabling you to specify whether a metafield can be queried in Shopify Analytics. This enhancement allows merchants to leverage custom metafield values for filtering and grouping data, providing deeper insights into their store's performance.
You can access this capability via the field. It can be set during the creation or update of a metafield definition using the and mutations.
Once enabled, the metafield becomes a dimension and filter in ShopifyQL and Shopify's Analytics, empowering merchants to refine their data analysis. Currently, this functionality supports the following values:
Example: Enabling Analytics Queryable on a New Metafield Definition
The following GraphQL mutation demonstrates how to enable the capability for a new metafield definition. This example sets up a metafield for products, allowing it to be used in analytics queries:
mutation {
metafieldDefinitionCreate(definition: {
name: "Fabric"
namespace: "custom"
key: "fabric"
type: "single_line_text_field"
ownerType: PRODUCT
capabilities: {
analyticsQueryable: { enabled: true }
}
}) {
createdDefinition {
id
capabilities {
analyticsQueryable {
enabled
}
}
}
userErrors {
field
message
}
}
}
This mutation creates a new metafield definition with the capability enabled, making it available for use in Shopify Analytics.