Skip to content

customerLogin

Mutationin Authentication

Authenticate a customer with email and password

Arguments

ArgumentTypeDescription
emailEmailAddress!
passwordString!

Returns

CustomerLoginResponse!

FieldTypeDescription
customerCustomerAuthenticated customer account information
cartMergeCartMergeWhat signing in did with the session's guest cart. Null when the session had none.
customerErrors[CustomerLoginError!]Error details if authentication failed

Example

mutation {
customerLogin(
email: "john.doe@example.com"
password: "securePassword123"
) {
customer {
id
email
givenName
familyName
}
customerErrors {
... on AuthenticationError {
code
message
}
}
}
}

The query is the example the schema documents. The response shows its shape with placeholder values.

Served by

@evolve-framework/commercetoolsResolved
@evolve-framework/medusaResolved
@evolve-framework/sfccResolved

Used by

The storefront packages that send it, in these GraphQL documents: