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

[Cart Operations] Create Empty Cart #118

@paliarush

Description

@paliarush

Implement mutation for empty cart creation by the guest/customer user.

Cart ID is expected in the response. For the guest it should be hashed.

AC:

  • createEmptyCart mutation is declared. Should accept no arguments and return cart ID of type String. See example of mutation declaration
  • For guest (no token provided via Authorization header), the following service should be used \Magento\Quote\Api\GuestCartManagementInterface::createEmptyCart
  • For customer (valid customer token is provided via Authorization header), the followigng service should be used \Magento\Quote\Api\CartManagementInterface::createEmptyCartForCustomer
  • Changes are covered with web API functional tests. See \Magento\GraphQl\TestModule\GraphQlMutationTest::testMutation as an example.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions