Storefront API - filtering on product variant color

Topic summary

A developer asked how to filter products by specific variant options (e.g., color=red) using Shopify’s Storefront API GraphQL.

Current Limitation:

  • The Storefront API’s query argument on the products connection does not support filtering by variant options like color
  • Only these variant-related filters are available: variants.price
  • Other supported filters include: available_for_sale, created_at, product_type, tag, title, updated_at, and vendor

Suggested Workaround:

  • Add a tag (e.g., “Red”) to all products that have variants with the desired color option
  • Then filter products using query: "tag:Red" in the GraphQL query
  • This approach uses the supported tag filter parameter as a proxy for variant options

Open Issue:

  • A follow-up comment suggests the available_for_sale filter may not be working properly, though this remains unresolved
Summarized with AI on November 6. AI used: claude-sonnet-4-5-20250929.

Thanks for your detailed answer, @hassain .

1 Like