Error Cannot return null for non-nullable field "SelectedShippingMethod.carrier_code" #38735
Open
1 of 5 tasks
Labels
Issue: needs update
Additional information is require, waiting for response
Reported on 2.4.7
Indicates original Magento version for the Issue report.
Projects
Preconditions and environment
It triggers because of the changes made in vendor/magento/module-quote-graph-ql/Model/Resolver/ShippingAddress/SelectedShippingMethod.php related to this commit [2.4.5] Incorrect carrier/method code on selected shipping method in GraphQL #36606.
Somehow, the shipping method from address has not been reset before, and the rate associate is not in the rates list.
$carrierCode
and$methodCode
variables remain null after the foreach block.Steps to reproduce
Not able to reproduce it in my local environment. It seems to be a very tricky use case.
Expected result
To not have selected address if last shipping method saved not matched with the new rates list.
Actual result
Cart GraphQL data are not returned in storefront because of this error.
Additional information
No response
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: