Log in
Model

CreateCompareList

Magento\CompareListGraphQl\Model\Service\CreateCompareList

What it does

This service class creates a new product compare list in Magento 2's GraphQL API.

Developers use this when implementing the compare products feature for customers, allowing them to create a new comparison list with a unique masked ID and optional customer association.

It's typically invoked through GraphQL mutations to initialize a compare list before adding products to it.

Public Methods

  • execute()