Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Quote masked id creation logic moved to create cart resolver #169

Merged
merged 3 commits into from
Sep 18, 2018

Conversation

rogyar
Copy link
Contributor

@rogyar rogyar commented Sep 4, 2018

Description

This PR brings a few improvements to the empty cart creation process introduced in #124.

The masked quote id creation is moved from \Magento\Quote\Model\QuoteIdToMaskedQuoteId to cart creation resolver in order to preserve CQRS principle.
Also, the masked quote id is recreated on every request for empty cart creation. In that way, we have duplicates in quote_id_mask table.
An additional logic has been added that checks for existing id masks for a requested quote.

Manual testing scenarios

  1. Create empty cart for logged in customer using GraphQL request.
  2. Check quote_id_mask database table. A new record should be created.
  3. Make the same request once again.
  4. No extra records should appear in the quote_id_mask table.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants