Skip to content

Commit

Permalink
ENGCOM-5960: graphQl-912: [Customer] CustomerInput improvements #941
Browse files Browse the repository at this point in the history
 - 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
  • Loading branch information
magento-engcom-team committed Sep 27, 2019
2 parents ea71192 + be95cfa commit c7f5f98
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions app/code/Magento/CustomerGraphQl/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ input CustomerInput {
middlename: String @doc(description: "The customer's middle name")
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")
email: String! @doc(description: "The customer's email address. Required")
dob: 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)")
taxvat: String @doc(description: "The customer's Value-added 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")
is_subscribed: Boolean @doc(description: "Indicates whether the customer is subscribed to the company's newsletter")
}
Expand All @@ -88,11 +88,11 @@ type Customer @doc(description: "Customer defines the customer name and address
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")
taxvat: String @doc(description: "The customer's Tax/VAT number (for corporate customers)")
taxvat: String @doc(description: "The customer's Value-added tax (VAT) number (for corporate customers)")
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.")
is_subscribed: Boolean @doc(description: "Indicates whether the customer is subscribed to the company's newsletter") @resolver(class: "\\Magento\\CustomerGraphQl\\Model\\Resolver\\IsSubscribed")
addresses: [CustomerAddress] @doc(description: "An array containing the customer's shipping and billing addresses") @resolver(class: "\\Magento\\CustomerGraphQl\\Model\\Resolver\\CustomerAddresses")
gender: Int @doc(description: "The customer's gender(Male - 1, Female - 2)")
gender: Int @doc(description: "The customer's gender (Male - 1, Female - 2)")
}

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

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

/**
* @expectedException \Exception
* @expectedExceptionMessage Required parameters are missing: Email
* @expectedExceptionMessage Field CustomerInput.email of required type String! was not provided
*/
public function testCreateCustomerIfEmailMissed()
{
Expand Down Expand Up @@ -275,7 +275,7 @@ public function testCreateCustomerIfNameEmpty()
QUERY;
$this->graphQlMutation($query);
}

/**
* @magentoConfigFixture default_store newsletter/general/active 0
*/
Expand Down

0 comments on commit c7f5f98

Please sign in to comment.