Skip to content

Commit c7f5f98

Browse files
ENGCOM-5960: graphQl-912: [Customer] CustomerInput improvements #941
- Merge Pull Request magento/graphql-ce#941 from magento/graphql-ce:GraphQl-912-CustomerInput-improvements - Merged commits: 1. 984ef45 2. eb29ce7 3. 8247d57 4. f9ff771 5. 30e8127 6. be95cfa
2 parents ea71192 + be95cfa commit c7f5f98

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

app/code/Magento/CustomerGraphQl/etc/schema.graphqls

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ input CustomerInput {
6060
middlename: String @doc(description: "The customer's middle name")
6161
lastname: String @doc(description: "The customer's family name")
6262
suffix: String @doc(description: "A value such as Sr., Jr., or III")
63-
email: String @doc(description: "The customer's email address. Required")
63+
email: String! @doc(description: "The customer's email address. Required")
6464
dob: String @doc(description: "The customer's date of birth")
65-
taxvat: String @doc(description: "The customer's Tax/VAT number (for corporate customers)")
66-
gender: Int @doc(description: "The customer's gender(Male - 1, Female - 2)")
65+
taxvat: String @doc(description: "The customer's Value-added tax (VAT) number (for corporate customers)")
66+
gender: Int @doc(description: "The customer's gender (Male - 1, Female - 2)")
6767
password: String @doc(description: "The customer's password")
6868
is_subscribed: Boolean @doc(description: "Indicates whether the customer is subscribed to the company's newsletter")
6969
}
@@ -88,11 +88,11 @@ type Customer @doc(description: "Customer defines the customer name and address
8888
default_billing: String @doc(description: "The ID assigned to the billing address")
8989
default_shipping: String @doc(description: "The ID assigned to the shipping address")
9090
dob: String @doc(description: "The customer's date of birth")
91-
taxvat: String @doc(description: "The customer's Tax/VAT number (for corporate customers)")
91+
taxvat: String @doc(description: "The customer's Value-added tax (VAT) number (for corporate customers)")
9292
id: Int @doc(description: "The ID assigned to the customer") @deprecated(reason: "id is not needed as part of Customer because on server side it can be identified based on customer token used for authentication. There is no need to know customer ID on the client side.")
9393
is_subscribed: Boolean @doc(description: "Indicates whether the customer is subscribed to the company's newsletter") @resolver(class: "\\Magento\\CustomerGraphQl\\Model\\Resolver\\IsSubscribed")
9494
addresses: [CustomerAddress] @doc(description: "An array containing the customer's shipping and billing addresses") @resolver(class: "\\Magento\\CustomerGraphQl\\Model\\Resolver\\CustomerAddresses")
95-
gender: Int @doc(description: "The customer's gender(Male - 1, Female - 2)")
95+
gender: Int @doc(description: "The customer's gender (Male - 1, Female - 2)")
9696
}
9797

9898
type CustomerAddress @doc(description: "CustomerAddress contains detailed information about a customer's billing and shipping addresses"){
@@ -112,7 +112,7 @@ type CustomerAddress @doc(description: "CustomerAddress contains detailed inform
112112
middlename: String @doc(description: "The middle name of the person associated with the shipping/billing address")
113113
prefix: String @doc(description: "An honorific, such as Dr., Mr., or Mrs.")
114114
suffix: String @doc(description: "A value such as Sr., Jr., or III")
115-
vat_id: String @doc(description: "The customer's Tax/VAT number (for corporate customers)")
115+
vat_id: String @doc(description: "The customer's Value-added tax (VAT) number (for corporate customers)")
116116
default_shipping: Boolean @doc(description: "Indicates whether the address is the default shipping address")
117117
default_billing: Boolean @doc(description: "Indicates whether the address is the default billing address")
118118
custom_attributes: [CustomerAddressAttribute] @deprecated(reason: "Custom attributes should not be put into container")

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function testCreateCustomerAccountWithoutPassword()
114114

115115
/**
116116
* @expectedException \Exception
117-
* @expectedExceptionMessage "input" value should be specified
117+
* @expectedExceptionMessage Field CustomerInput.email of required type String! was not provided
118118
*/
119119
public function testCreateCustomerIfInputDataIsEmpty()
120120
{
@@ -140,7 +140,7 @@ public function testCreateCustomerIfInputDataIsEmpty()
140140

141141
/**
142142
* @expectedException \Exception
143-
* @expectedExceptionMessage Required parameters are missing: Email
143+
* @expectedExceptionMessage Field CustomerInput.email of required type String! was not provided
144144
*/
145145
public function testCreateCustomerIfEmailMissed()
146146
{
@@ -275,7 +275,7 @@ public function testCreateCustomerIfNameEmpty()
275275
QUERY;
276276
$this->graphQlMutation($query);
277277
}
278-
278+
279279
/**
280280
* @magentoConfigFixture default_store newsletter/general/active 0
281281
*/

0 commit comments

Comments
 (0)