diff --git a/app/code/Magento/CustomerGraphQl/etc/schema.graphqls b/app/code/Magento/CustomerGraphQl/etc/schema.graphqls index d27debdc39c64..73d33f5bf01db 100644 --- a/app/code/Magento/CustomerGraphQl/etc/schema.graphqls +++ b/app/code/Magento/CustomerGraphQl/etc/schema.graphqls @@ -61,7 +61,8 @@ input CustomerInput { lastname: String @doc(description: "The customer's family name") suffix: String @doc(description: "A value such as Sr., Jr., or III") email: String @doc(description: "The customer's email address. Required") - dob: String @doc(description: "The customer's date of birth") + dob: @deprecated(reason: "The `dob` is deprecated. Use `date_of_birth` instead.") String @doc(description: "The customer's date of birth") + date_of_birth: String @doc(description: "The customer's date of birth") taxvat: String @doc(description: "The customer's Tax/VAT number (for corporate customers)") gender: Int @doc(description: "The customer's gender(Male - 1, Female - 2)") password: String @doc(description: "The customer's password") @@ -87,7 +88,8 @@ type Customer @doc(description: "Customer defines the customer name and address email: String @doc(description: "The customer's email address. Required") default_billing: String @doc(description: "The ID assigned to the billing address") default_shipping: String @doc(description: "The ID assigned to the shipping address") - dob: String @doc(description: "The customer's date of birth") + dob: @deprecated(reason: "The `dob` is deprecated. Use `date_of_birth` instead.") String @doc(description: "The customer's date of birth") + date_of_birth: String @doc(description: "The customer's date of birth") taxvat: String @doc(description: "The customer's Tax/VAT number (for corporate customers)") id: Int @doc(description: "The ID assigned to the customer") is_subscribed: Boolean @doc(description: "Indicates whether the customer is subscribed to the company's newsletter") @resolver(class: "\\Magento\\CustomerGraphQl\\Model\\Resolver\\IsSubscribed") diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerTest.php index 178d10b3c35a4..d1c6638e8d5ff 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerTest.php @@ -69,7 +69,7 @@ public function testUpdateCustomer() middlename: "{$newMiddlename}" lastname: "{$newLastname}" suffix: "{$newSuffix}" - dob: "{$newDob}" + date_of_birth: "{$newDob}" taxvat: "{$newTaxVat}" email: "{$newEmail}" password: "{$currentPassword}" @@ -82,7 +82,7 @@ public function testUpdateCustomer() middlename lastname suffix - dob + date_of_birth taxvat email gender @@ -102,7 +102,7 @@ public function testUpdateCustomer() $this->assertEquals($newMiddlename, $response['updateCustomer']['customer']['middlename']); $this->assertEquals($newLastname, $response['updateCustomer']['customer']['lastname']); $this->assertEquals($newSuffix, $response['updateCustomer']['customer']['suffix']); - $this->assertEquals($newDob, $response['updateCustomer']['customer']['dob']); + $this->assertEquals($newDob, $response['updateCustomer']['customer']['date_of_birth']); $this->assertEquals($newTaxVat, $response['updateCustomer']['customer']['taxvat']); $this->assertEquals($newEmail, $response['updateCustomer']['customer']['email']); $this->assertEquals($newGender, $response['updateCustomer']['customer']['gender']);