Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updateCustomerV2 code style fixes #341

Merged
merged 2 commits into from
Nov 20, 2019

Conversation

lenaorobei
Copy link
Contributor

@lenaorobei lenaorobei commented Nov 8, 2019

Problem

  • Propose schema is inconsistent with existing one. CustomerOutput already exists and is used in createCustomer (input: CustomerInput!): CustomerOutput mutation.
type CustomerOutput {
    customer: Customer!
}
  • Removed updateCustomerPassword because changeCustomerPassword(currentPassword: String!, newPassword: String!): Customer already exists

Requested Reviewers

@paliarush
@melnikovi

}
```

**updateCustomerPassword**

```graphql
mutation {
updateCustomerPassword(password: String!, old_password: String!): Customer
updateCustomerPassword(currentPassword: String!, newPassword: String!): CustomerOutput
Copy link
Member

Choose a reason for hiding this comment

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

According to #269, fields should be snake case. I would also propose to keep password and old_password arguments.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But this is argument of the mutation.
Regarding naming, I think we need more thoughts here.
@buskamuza @paliarush

@@ -15,7 +15,7 @@ Deprecate `updateCustomer` mutation in favor of `updateCustomerV2`. `CustomerUpd

```graphql
mutation {
updateCustomerV2(input: CustomerUpdateInput!): Customer
updateCustomerV2(input: CustomerUpdateInput!): CustomerOutput
Copy link
Member

Choose a reason for hiding this comment

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

I agree that it would not be consistent with existing operations. But I would only change it if we think that we may want to add more data in the future.

@melnikovi melnikovi merged commit de5709e into magento:master Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants