Log in
Model

AssignShippingMethodToCart

Magento\QuoteGraphQl\Model\Cart\AssignShippingMethodToCart

What it does

This class assigns a shipping method to a shopping cart in Magento 2's GraphQL API.

Developers use it when processing GraphQL mutations that set shipping methods during checkout, converting the GraphQL input into shipping information and saving it to the quote.

It handles validation and error transformation for GraphQL responses.

Public Methods

  • execute()