updateCustomerEmail mutation
Use the updateCustomerEmail
mutation to change the email address for the logged-in customer.
To return or modify information about a customer, we recommend you use customer tokens in the header of your GraphQL calls. However, you also can use session authentication.
Syntax
mutation: updateCustomerEmail(email: String! password: String!): CustomerOutput
Reference
The updateCustomerEmail
reference provides detailed information about the types and fields defined in this mutation.
Example usage
The following call updates the customer's email address.
Request:
Copied to your clipboardmutation {updateCustomerEmail(email: "new_email@example.com", password: "roni_cost3@example.com") {customer {}}}
Response:
Copied to your clipboard{"data": {"updateCustomerEmail": {"customer": {"email": "new_email@example.com"}}}}