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 fields
}
customerUserErrors {
# CustomerUserError fields
}
}
}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: "Jane"
lastName: "Doe"
email: "jane.doe@example.com"
phone: "+1-555-0123"
}) {
customer {
id
firstName
lastName
email
phone
}
customerUserErrors {
field
message
code
}
}
}