Skip to content

Commit 9a01c2f

Browse files
committed
GraphQL-641: Schema Inconsistency of "cartItems" declaration
1 parent f393ffd commit 9a01c2f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/code/Magento/QuoteGraphQl/Model/Resolver/AddSimpleProductsToCart.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value
5252
}
5353
$maskedCartId = $args['input']['cart_id'];
5454

55-
if (!isset($args['input']['cartItems']) || empty($args['input']['cartItems'])
56-
|| !is_array($args['input']['cartItems'])
55+
if (!isset($args['input']['cart_items']) || empty($args['input']['cart_items'])
56+
|| !is_array($args['input']['cart_items'])
5757
) {
58-
throw new GraphQlInputException(__('Required parameter "cartItems" is missing'));
58+
throw new GraphQlInputException(__('Required parameter "cart_items" is missing'));
5959
}
60-
$cartItems = $args['input']['cartItems'];
60+
$cartItems = $args['input']['cart_items'];
6161

6262
$cart = $this->getCartForUser->execute($maskedCartId, $context->getUserId());
6363
$this->addProductsToCart->execute($cart, $cartItems);

0 commit comments

Comments
 (0)