This repository was archived by the owner on Dec 19, 2019. It is now read-only.
Description
Preconditions (*)
Magento 2.3.2
PHP 7.2
Steps to reproduce (*)
Create a guest cart using the createGuestCart mutation
Add a shipping address to the cart
Perform the following query:
query {
cart(cart_id: "your cart id") {
shipping_addresses {
available_shipping_methods {
carrier_code
}
selected_shipping_method {
carrier_code
carrier_title
method_code
method_title
}
}
}
}
Expected result (*)
The selected shipping method is empty/null
The available shipping methods object to contain the correct carrier codes configured
Actual result (*)
An error is returned:
{
"errors": [
{
"message": "Internal server error",
"category": "internal",
"locations": [
{
"line": 7,
"column": 7
}
],
"path": [
"cart",
"shipping_addresses",
0,
"selected_shipping_method"
]
}
],
"data": {
"cart": {
"shipping_addresses": [
{
"available_shipping_methods": [
{
"carrier_code": "flatrate"
}
],
"selected_shipping_method": null
}
]
}
}
}
Note that this error does not occur when we only select the selected_shipping_methods (without the available_shipping_methods) , so a query like
query {
cart(cart_id: "Kuvi8t2mSaqeh8pkWBnLXXmqQnkLu0Tr") {
shipping_addresses {
selected_shipping_method {
carrier_code
carrier_title
method_code
method_title
}
}
}
}
returns the expected result.
This issue looks a lot like #665 and according to (#665 (comment) ) it should've been investigated. However, I couldn't find and PR to fix it.