changeCustomerPassword
changeCustomerPassword is a Magento 2 GraphQL mutation in the Customer module. Change the password for the logged-in customer. It returns Customer and requires an Authorization header (Bearer customer token).
Last verified: against Magento 2.4.9.
Returns
Resolver class
\Magento\CustomerGraphQl\Model\Resolver\ChangePassword
Arguments
The customer's original password.
The customer's updated password.
Example request
Auto-generated from the SDL — paste-ready against your store's /graphql endpoint. Replace the host, store code, and any required values before running.
Headers
Query
mutation ($currentPassword: String!, $newPassword: String!) {
changeCustomerPassword(currentPassword: $currentPassword, newPassword: $newPassword) {
compare_list {
uid
items {
uid
product { ... }
attributes { ... }
}
attributes {
code
label
}
item_count
}
created_at
group_id
prefix
firstname
middlename
lastname
suffix
email
default_billing
default_shipping
dob
date_of_birth
taxvat
id
is_subscribed
addresses {
id
uid
customer_id
region {
region_code
region
region_id
}
region_id
country_id
country_code
street
company
telephone
fax
postcode
city
firstname
lastname
middlename
prefix
suffix
vat_id
default_shipping
default_billing
custom_attributes {
attribute_code
value
}
custom_attributesV2 {
code
}
extension_attributes {
attribute_code
value
}
}
addressesV2 {
items {
id
uid
customer_id
region { ... }
region_id
country_id
country_code
street
company
telephone
fax
postcode
city
firstname
lastname
middlename
prefix
suffix
vat_id
default_shipping
default_billing
custom_attributes { ... }
custom_attributesV2 { ... }
extension_attributes { ... }
}
page_info {
page_size
current_page
total_pages
}
total_count
}
gender
custom_attributes {
code
}
confirmation_status
group {
uid
}
allow_remote_shopping_assistance
reviews {
items {
product { ... }
summary
text
nickname
created_at
average_rating
ratings_breakdown { ... }
}
page_info {
page_size
current_page
total_pages
}
}
orders {
items {
gift_message { ... }
id
order_date
status
number
items { ... }
total { ... }
invoices { ... }
shipments { ... }
credit_memos { ... }
payment_methods { ... }
shipping_address { ... }
billing_address { ... }
carrier
shipping_method
comments { ... }
increment_id
order_number
created_at
grand_total
token
applied_coupons { ... }
email
is_virtual
available_actions
customer_info { ... }
order_status_change_date
}
page_info {
page_size
current_page
total_pages
}
total_count
date_of_first_order
}
wishlists {
id
items {
id
qty
description
added_at
product { ... }
}
items_v2 {
items { ... }
page_info { ... }
}
items_count
sharing_code
updated_at
}
wishlist {
id
items {
id
qty
description
added_at
product { ... }
}
items_v2 {
items { ... }
page_info { ... }
}
items_count
sharing_code
updated_at
}
wishlist_v2 {
id
items {
id
qty
description
added_at
product { ... }
}
items_v2 {
items { ... }
page_info { ... }
}
items_count
sharing_code
updated_at
}
}
}Variables
{
"currentPassword": "",
"newPassword": ""
}Related in CustomerGraphQl
Other fields shipped by the same module.
confirmEmail
Confirms the email address for a customer.
Customer · returns CustomerOutput
createCustomer
DeprecatedCustomer · returns CustomerOutput
createCustomerAddress
Create a billing or shipping address for a customer or guest.
Customer · returns CustomerAddress
createCustomerV2
Create a customer account.
Customer · returns CustomerOutput
customer
Return detailed information about a customer account.
Customer · returns Customer
customerGroup
Provides Customer Group assigned to the Customer or Guest.
Customer · returns CustomerGroupStorefront!
Every Magento dev tool, in one hosted workspace.
Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.