-
Notifications
You must be signed in to change notification settings - Fork 9.4k
magento/magento2#: GraphQl. Remove a redundant logic in “SetShippingMethodsOnCart” mutation resolver #27349
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
Conversation
…ethodsOnCart” mutation
Hi @atwixfirster. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
…ve-redundant-logic
@rogyar , could you please review this PR because failed static tests are not tie to the provided changes. Thank you! |
Hi @rogyar, thank you for the review. |
…ve-redundant-logic
✔️ QA Passed After: Case 1method_code doesn't exist Request: mutation {
setShippingMethodsOnCart(input: {
cart_id: "IIHXzIYP2HelB7xerWpZN1h4EZU7wxk4"
shipping_methods:
[
{
carrier_code: "ups"
}
]
}) {
cart {
shipping_addresses {
selected_shipping_method {
carrier_code
method_code
carrier_title
method_title
}
}
}
}
} Response: {
"errors": [
{
"message": "Field ShippingMethodInput.method_code of required type String! was not provided.",
"extensions": {
"category": "graphql"
},
"locations": [
{
"line": 2,
"column": 100
}
]
}
]
} Case 2carrier_code doesn't exist Request: mutation {
setShippingMethodsOnCart(input: {
cart_id: "IIHXzIYP2HelB7xerWpZN1h4EZU7wxk4"
shipping_methods:
[
{
method_code: "GND"
}
]
}) {
cart {
shipping_addresses {
selected_shipping_method {
carrier_code
method_code
carrier_title
method_title
}
}
}
}
} Response: {
"errors": [
{
"message": "Field ShippingMethodInput.carrier_code of required type String! was not provided.",
"extensions": {
"category": "graphql"
},
"locations": [
{
"line": 2,
"column": 100
}
]
}
]
} |
@magento create issue |
Hi @VladimirZaets, thank you for the review. |
@magento create issue |
…ve-redundant-logic
@magento run all tests |
…ve-redundant-logic
@magento run all tests |
@magento run integration tests |
…ve-redundant-logic
@magento run all tests |
…“SetShippingMethodsOnCart” mutation resolver #27349
Hi @atwixfirster, thank you for your contribution! |
Description (*)
PR removes a redundant logic in the
SetShippingMethodsOnCart
mutation resolver becauseWebonix
covers the next cases:shipping_methods
.carrier_code
does not existshipping_methods
.method_code
does not existRelated Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)
Resolved issues:
Resolved issues: