Log in
Model

CartItemTypeResolver

Magento\QuoteGraphQl\Model\Resolver\CartItemTypeResolver

What it does

This class resolves the GraphQL type for cart items based on the product type.

When a cart query returns items, this resolver maps Magento product types (simple, configurable, bundle, etc.) to their corresponding GraphQL types, ensuring the correct schema is used in the API response.

Developers extend this by adding new product type mappings through dependency injection.

Public Methods

  • resolveType()