Skip to main content

Updated function syntax on the segment query language

As of GraphQL Admin API version 2026-10, functions in the segment query language now use the operators MATCHES/NOT MATCHES instead of = true/= false. For example, the previous query shopify_email.opened() = true would now be represented as shopify_email.opened MATCHES ().

The parameters for each function have also been expanded to use their own operators. For example, the query products_purchased(quantity: 5) = true would now be represented as products_purchased MATCHES (quantity = 5). This expands the functionality of parameters. For example, the following queries were not possible before: products_purchased MATCHES (quantity != 5), products_purchased MATCHES (quantity > 5).

Additionally, the following named dates have been deprecated: 12_months_ago, 90_days_ago, 30_days_ago, 7_days_ago. Instead, the you can use the existing date offsets in your segment queries. For example, the named date 12_months_ago is equivalent to the date offset -12m.

Learn more about customer segment filters in our Help Center.

Was this page helpful?