Log in
Model

BuyRequestBuilder

Magento\QuoteGraphQl\Model\Cart\BuyRequest\BuyRequestBuilder

What it does

This class builds buy request objects needed when adding products to a shopping cart via GraphQL.

It aggregates data from multiple providers (like quantity, custom options, etc.) and creates a standardized DataObject that Magento uses to process the add-to-cart action.

Developers would use this when implementing custom GraphQL mutations for adding products to cart or extending the cart functionality.

Public Methods

  • build()