Not able to filter orders with not empty email

I’m trying to get the orders with email attribute not null.

I tried with this query but I always get an empty result set:

{
	orders(first: 180, query: "email:*") {
		edges {
			node {
				id
				name
				email
				shippingLines (first:10) {
					edges {
						node {
							code
						}
					}
				}
			}
		}
	}
}

If I remove the “query” filter I get several results.

I tried with different API versions until 2024-04 but the behaviour is always the same.

Hey @alessmar ,

Thanks for sharing that. Testing here, I do notice that in the format you’ve shared, it’s returning all orders, regardless of if there is a null email or not.

When I add a greater-than-or-equal-to comparator, it returns only the orders that have an email.

orders(first: 180, query: “email:>=*”)

Hope that helps,

Kyle G.

1 Like