How To Create Customer Registration By Using GraphQL in Magento 2.x / Adobe Commerce 2.x

The following below steps need to create Customer Registration Details By Using GraphQL in Magento 2.x / Adobe Commerce 2.x

Step [1] – Recommendation to use below customer customer syntax

Here Using Postman

Syntax –

need to use createCustomer mutation to register the new customer account in the store.

Step [2] – Put below Request

mutation {
  createCustomer(
    input: {
      firstname: "John"
      lastname: "Doe"
      email: "johndusa1021@gmail.com"
      password: "admin123!!"
      is_subscribed: true
    }
  ) {
    customer {
      firstname
      lastname
      email
      is_subscribed
    }
  }
}

Step [3] – Below output response

{
    "data": {
        "createCustomer": {
            "customer": {
                "firstname": "John",
                "lastname": "Doe",
                "email": "johndusa1021@gmail.com",
                "is_subscribed": true
            }
        }
    }
}

The Customer’s registration details store in database as below

Leave a Reply

Your email address will not be published. Required fields are marked *