Log in
Model

QuantityDataProvider

Magento\QuoteGraphQl\Model\Cart\BuyRequest\QuantityDataProvider

What it does

This class extracts and validates the quantity value from GraphQL cart item input data when adding products to a cart.

It ensures the quantity is present, numeric, and greater than zero, throwing GraphQL exceptions if validation fails.

Developers use this as part of the buy request data building process in Magento's GraphQL cart operations.

Public Methods

  • execute()