Date filters for MATCHES do not work in customerSegmentMembers GraphQL query

The following filter works in the Shopify Customer Segments area in the Shopify Admin, but fails in GraphQL:

shopify_email.opened MATCHES (date <= -30d)

However, in GraphQL, this query fails:

{
  customerSegmentMembers(
    query: "shopify_email.opened MATCHES (date <= -30d)"
    first: 1
  ) {
    totalCount
  }
}

The following error is returned:

{
	"errors": [
		{
			"message": "Line 1 Column 0: 'MATCHES' is unexpected.",
			"locations": [
				{
					"line": 3,
					"column": 5
				}
			],
			"path": [
				"customerSegmentMembers",
				"query"
			]
		}
	],
	"data": null,
	"extensions": {
		"cost": {
			"requestedQueryCost": 112,
			"actualQueryCost": 2,
			"throttleStatus": {
				"maximumAvailable": 2000.0,
				"currentlyAvailable": 1998,
				"restoreRate": 100.0
			}
		}
	}
}

Here’s the X-Request-ID for Shopifolk: 8c5ccfcc-6fe4-41e4-9820-7c3b39c578c3-1759501227

It seems to be specific to the “date” filter. Other filters like “count” work fine.

Hey @marcbaumbach, I did some testing here and this was working for me in the unstable API version, but I was getting the same error as you on all other versions.

Looking over our documentation here I would expect this to work. Let me look in to this further. I’ll report back here what I find.

Thanks @KyleG-Shopify!

Hey @marcbaumbach, after digging in to this, I found that that the date parameter for function-type attributes isn’t currently supported in stable API versions despite our docs suggesting it is. It does work in unstable, but keep in mind that version is subject to breaking changes without notice.

I’m not aware of a timeline on when/if this will move in to a stable version, but keep and eye on the developer changelog for any changes there. I’ll also try and update this post if I see any changes here as well.

Thanks @KyleG-Shopify, I appreciate the follow up. We’re only using this for some one-off scripts at the moment, so luckily we don’t need to integrate this into our product just yet. We’ll keep an eye on the changelog and use the unstable for these on-offs.

Hey @KyleG-Shopify, this still seems to be an issue with the latest 2026-04 release. I know we saw it working in unstable at one point. Any updates on when this will be fixed?