Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Customer group_id deprecation #933

Merged
merged 2 commits into from
Sep 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ public function execute(CustomerInterface $customer): array
}
}
$customerData = array_merge($customerData, $customAttributes);

//Field is deprecated and should not be exposed on storefront.
$customerData['group_id'] = null;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, nice to know the correct file to change in cases like this.
Thank you, @lenaorobei.

$customerData['model'] = $customer;
return $customerData;
}
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/CustomerGraphQl/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ type RevokeCustomerTokenOutput {

type Customer @doc(description: "Customer defines the customer name and address and other details") {
created_at: String @doc(description: "Timestamp indicating when the account was created")
group_id: Int @doc(description: "The group assigned to the user. Default values are 0 (Not logged in), 1 (General), 2 (Wholesale), and 3 (Retailer)")
group_id: Int @deprecated(reason: "Customer group should not be exposed in the storefront scenarios")
prefix: String @doc(description: "An honorific, such as Dr., Mr., or Mrs.")
firstname: String @doc(description: "The customer's first name")
middlename: String @doc(description: "The customer's middle name")
Expand Down