QuestionQ50
VerifiedCustomize Commerce featuresAn Adobe Commerce Architect is developing a new GraphQL API mutation to modify how configurable products are added to the cart. The mutation accepts a configurable product ID. If the specified product has only one variant, the mutation must add that variant to the cart and return a non-nullable Cart type. If the configurable product has more variants, the mutation must return a non-nullable ConfigurableProduct type.
The mutation declaration is as follows:

How should the Adobe Commerce Architect declare this mutation’s output?
Community Discussion