-
Notifications
You must be signed in to change notification settings - Fork 150
GraphQL-893 improved strict typing in SelectedShippingMethod #900
GraphQL-893 improved strict typing in SelectedShippingMethod #900
Conversation
lenaorobei
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The expected behaviour here is when method is selected return array with data, if not, return null. We should not return array keys with null values.
Thank you for the clarification, added the changes. |
…ShippingMethod # Conflicts: # app/code/Magento/QuoteGraphQl/Model/Resolver/ShippingAddress/SelectedShippingMethod.php # app/code/Magento/QuoteGraphQl/etc/schema.graphqls # dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetSelectedShippingMethodTest.php # dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/GetSelectedShippingMethodTest.php
…ShippingMethod # Conflicts: # app/code/Magento/QuoteGraphQl/Model/Resolver/ShippingAddress/SelectedShippingMethod.php
|
@lenaorobei pulled, thank you. |
| $rates = $address->getAllShippingRates(); | ||
| $carrierTitle = null; | ||
| $methodTitle = null; | ||
| $carrierTitle = ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove redundant lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove redundant lines.
In case I'll remove these lines the $carrierTitle and the $methodTitle variables might not be defined (please check lines 46, 47).
Should I add any changes here?
Thank you.
|
@magento run Integration Tests build |
|
Hi @lenaorobei, thank you for the review.
|
|
Hi @sergiy-v, thank you for your contribution! |
Description (*)
Improved strict typing in SelectedShippingMethod.
Fixed Issues (if relevant)
#893: [Checkout] Improve strict typing in SelectedShippingMethod