-
Notifications
You must be signed in to change notification settings - Fork 254
Msi 2382 graph ql support for in store pickup mutation #2427
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
Msi 2382 graph ql support for in store pickup mutation #2427
Conversation
Add simple module declaration.
Add parameter to SetShippingAddress mutation.
Add api tests coverage.
Fix static tests.
|
Not sure about copy-paste detector. |
|
@swnsma CPD is something we can ignore if there is a valid reason. Shouldn't be a problem here. |
Fix bug with deletion of address pickup locatio .
Add Pickup Location to Quote Shipping Address Graph Ql Schema. Fix adding of Pickup Location Code to Shipping Address.
| $cartRepository->save($cart); | ||
|
|
||
| /** @var \Magento\Quote\Model\QuoteIdMask $quoteIdMask */ | ||
| $quoteIdMask = Bootstrap::getObjectManager()->create(QuoteIdMaskFactory::class)->create(); |
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.
Should we specify in the fixture name that this is a guest quote?
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.
To be honest, I think there need to be done arrangement of fixtures.
I think we can rename it to 'guest' but during API tests coverage, fixtures need to be refactored.
| $cartRepository->save($cart); | ||
|
|
||
| /** @var \Magento\Quote\Model\QuoteIdMask $quoteIdMask */ | ||
| $quoteIdMask = Bootstrap::getObjectManager()->create(QuoteIdMaskFactory::class)->create(); |
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.
Fixture name states that it's intended for customer, but this seems to be another guest quote.
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 point that masked_quote_id is required in any case.
Please see.
\Magento\QuoteGraphQl\Model\Resolver\SetShippingAddressesOnCart::resolve
\Magento\QuoteGraphQl\Model\Cart\GetCartForUser::execute
.../InventoryInStorePickupQuote/Model/Quote/ValidationRule/InStorePickupQuoteValidationRule.php
Outdated
Show resolved
Hide resolved
...Magento/InventoryInStorePickupQuote/Model/ResourceModel/DeleteQuoteAddressPickupLocation.php
Outdated
Show resolved
Hide resolved
app/code/Magento/InventoryInStorePickupQuote/Plugin/Quote/PassPickupLocationToOrder.php
Outdated
Show resolved
Hide resolved
| /** | ||
| * Set shipping address to the cart. Proceed with passed Pickup Location code. | ||
| */ | ||
| class SetShippingAddressesOnCart implements SetShippingAddressesOnCartInterface |
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.
| class SetShippingAddressesOnCart implements SetShippingAddressesOnCartInterface | |
| class SetShippingAddressesToCart implements SetShippingAddressesToCartInterface |
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 original interface has name 'SetShippingAddressesOnCartInterface'.
I think that this is better to keep them similar.
…2382-GraphQl-support-for-In-Store-Pickup-Mutation Conflicts: composer.lock
| * @throws GraphQlInputException | ||
| * @throws GraphQlNoSuchEntityException | ||
| */ | ||
| private function getShippingAddress(array $shippingAddressInput, ContextInterface $context): Address |
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.
Why isn't it possible just to implement a plugin for the class where this logic originally came from?
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.
Do you mean around plugin without calling the proceed?
...gento/InventoryInStorePickupQuoteGraphQl/Test/Api/Customer/PickupLocationForShippingTest.php
Show resolved
Hide resolved
.../Magento/InventoryInStorePickupQuoteGraphQl/Test/Api/Guest/PickupLocationForShippingTest.php
Show resolved
Hide resolved
ishakhsuvarov
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.
Please take a look at the review comments
Apply code review changes.
…of github.com:magento-engcom/msi into MSI-2382-GraphQl-support-for-In-Store-Pickup-Mutation
|
Hi guys, @ishakhsuvarov @lenaorobei, Thank you for your review. |
…2382-GraphQl-support-for-In-Store-Pickup-Mutation
…e-Pickup-Mutation
Fix Pickup Location missed for created order.
…of github.com:magento-engcom/msi into MSI-2382-GraphQl-support-for-In-Store-Pickup-Mutation
|
No other comments from my side. Please make sure that schema is submitted and approved here https://github.com/magento/architecture/tree/master/design-documents/graph-ql/coverage |
ishakhsuvarov
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.
I've filed an issue #2557 to take one more look at the copy-pasted code in the future
Description
Extension of Quote Graph Ql endpoint to become able to pass pickup location code.
Issue: #2382