customerUpdate
Updates an existing customer account. Requires a valid customer access token via the @storeContext directive.
Authentication
Authentication Required: Secret API key with scope
customer:write
Mutation Structure
mutation {
customerUpdate(input: CustomerUpdateInput!) {
customer: Customer
customerUserErrors: [CustomerUserError]!
}
}Input Arguments
Return Type
CustomerUpdatePayload - Payload returned by the customerUpdate mutation. Contains the updated customer object and any errors that occurred during the operation.
Example
mutation {
customerUpdate(input: {
firstName: "John"
lastName: "Doe"
email: "john.doe@example.com"
phone: "+1234567890"
}) {
customer {
id
firstName
lastName
email
phone
}
customerUserErrors {
field
message
}
}
}