-
Notifications
You must be signed in to change notification settings - Fork 156
Base shipping methods support #342
Base shipping methods support #342
Conversation
…methods-checkout # Conflicts: # app/code/Magento/QuoteGraphQl/Model/Cart/Address/AddressDataProvider.php # app/code/Magento/QuoteGraphQl/Model/Resolver/BillingAddress.php # app/code/Magento/QuoteGraphQl/Model/Resolver/ShippingAddresses.php # app/code/Magento/QuoteGraphQl/etc/schema.graphqls # dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/SetShippingMethodOnCartTest.php
@@ -12,6 +12,7 @@ | |||
<module name="Magento_ConfigurableProduct"/> | |||
<module name="Magento_GraphQl"/> | |||
<module name="Magento_CatalogGraphQl"/> | |||
<module name="Magento_QuoteGraphQl"/> |
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.
It's necessary since CartItemDetailsInput
field that is used in this module declared within a scope of Magento_QuoteGraphQl
75e95e9
to
d10e506
Compare
@@ -57,36 +57,39 @@ public function __construct( | |||
*/ | |||
public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null) | |||
{ | |||
$shippingMethods = $this->arrayManager->get('input/shipping_methods', $args); |
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.
Pls, verify that is proper changes
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.
Yes, this change is required. Please, take a look at the schema change https://github.com/magento/graphql-ce/pull/342/files#diff-795a33fde881f18aba5165a5a8c7513fR63
We have changed the input in order to reflect the new schema from here https://github.com/magento/graphql-ce/wiki/Checkout-workflow
mutation {
setShippingMethodOnCart (
input: {
cart_id: "vpLKDPvz0F2P2J3ksx97ZcSHUA95a8PX"
shipping_addresses: [ <!-- Here is the mentioned change
{
...
Thanks.
…methods-checkout # Conflicts: # app/code/Magento/QuoteGraphQl/Model/Resolver/SetShippingMethodsOnCart.php
…methods-checkout # Conflicts: # app/code/Magento/QuoteGraphQl/Model/Cart/ExtractDataFromAddress.php # app/code/Magento/QuoteGraphQl/Model/Resolver/SetShippingMethodsOnCart.php
7515ddc
to
a13639c
Compare
Hi @rogyar, thank you for your contribution! |
Description (*)
This PR introduced refactored logic for setting shipping methods. The new GraphQl schema is introduced here.
#418
Supported shipping methods
Fixed Issues (if relevant)
Manual testing scenarios (*)
Use the following query with your own data to set a shipping method: