Cannot use email as query field for DraftOrders GraphQL Admin API

yukaii
New Member
2 0 0

When using the DraftOrders GraphQL Admin API, there's a sample of querying draftOrders by email field.

But when I actually ran the sample, it also returns the draftOrder without email. Is this an outdated sample and not supported anymore?

Thanks in advance.

Screen Shot 2020-08-28 at 5.21.10 PM.png

0 Likes
Greg_Kujawa
Shopify Partner
1016 83 221

When I look at this I don't see this as a draftOrders query option --> https://shopify.dev/docs/admin-api/graphql/reference/queryroot.

Specifically below...

DraftOrders.jpg

0 Likes
yukaii
New Member
2 0 0

So currently there's no way to query draftOrder by customer email or id, right?

The email query sample is from here:

Screen Shot 2020-08-28 at 11.12.56 PM.png

0 Likes
Greg_Kujawa
Shopify Partner
1016 83 221

If you try it there based on that query parameter it returns other records as well in the response. So that would be a NO for e-mail...lol. But you can by customer_id according to the API endpoint specs.

Untitled.jpg