Log in
Model

GetDiscounts

Magento\QuoteGraphQl\Model\GetDiscounts

What it does

This class retrieves and formats discount information from a quote for GraphQL responses.

Developers use this when implementing cart or checkout GraphQL queries that need to display applied discounts, including discount labels, amounts, and which items they apply to.

It extracts discount data from the quote's billing address extension attributes and structures it for API consumption.

Public Methods

  • execute()