Log in
Model

SetShippingMethodsOnCart

Magento\QuoteGraphQl\Model\Cart\SetShippingMethodsOnCart

What it does

This model handles setting a shipping method on a shopping cart through GraphQL mutations.

Developers use this class when implementing the GraphQL endpoint for customers to select their preferred shipping method during checkout.

It validates that only one shipping method is provided and that required carrier and method codes are present before assigning the shipping method to the cart.

Public Methods

  • execute()