How to use this graphql

Topic summary

A developer is encountering issues with Shopify’s GraphQL API when querying customer email addresses. The email field is deprecated with a suggestion to use defaultEmailAddress.emailAddress instead. However, attempting to use defaultEmailAddress results in an error: “Field ‘defaultEmailAddress’ doesn’t exist on type ‘Customer’”.

Current Status:

  • Another user confirms experiencing the same error
  • Both users are forced to continue using the deprecated email field as a workaround
  • No solution has been identified yet

The discussion remains unresolved, with participants seeking guidance on the correct syntax or approach to access customer email addresses without using deprecated fields.

Summarized with AI on October 28. AI used: claude-sonnet-4-5-20250929.

query {
customer(id: “gid://shopify/Customer/customerId”) {
id
firstName
verifiedEmail
email
}
}
when i use this email i got a warning of deprecated of this email. and get that suggestion Use defaultEmailAddress.emailAddress instead.
so how to use this.

if i try to use this like this

query {
customer(id: “gid://shopify/Customer/6884731191392”) {
id
firstName
verifiedEmail
defaultEmailAddress {
email
}
}
}
i got that error "
“message”: “Field ‘defaultEmailAddress’ doesn’t exist on type ‘Customer’”,

now tell me please if anyone know how to use this

1 Like

i got same error and have to use deprecated email field

lostarrows27_0-1747195375502.png