Skip to content

Commit 476ea33

Browse files
committed
Converting the arguments in camelcase format
1 parent f0a4bc9 commit 476ea33

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

app/code/Magento/WishlistGraphQl/Model/Resolver/AddProductsToWishlist.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ public function resolve(
9393
throw new GraphQlAuthorizationException(__('The current user cannot perform operations on wishlist'));
9494
}
9595

96-
$wishlistId = ((int) $args['wishlist_id']) ?: null;
96+
$wishlistId = ((int) $args['wishlistId']) ?: null;
9797
$wishlist = $this->getWishlist($wishlistId, $customerId);
9898

9999
if (null === $wishlist->getId() || $customerId !== (int) $wishlist->getCustomerId()) {
100100
throw new GraphQlInputException(__('The wishlist was not found.'));
101101
}
102102

103-
$wishlistItems = $this->getWishlistItems($args['wishlist_items']);
103+
$wishlistItems = $this->getWishlistItems($args['wishlistItems']);
104104
$wishlistOutput = $this->addProductsToWishlist->execute($wishlist, $wishlistItems);
105105

106106
return [

app/code/Magento/WishlistGraphQl/Model/Resolver/RemoveProductsFromWishlist.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ public function resolve(
9393
throw new GraphQlAuthorizationException(__('The current user cannot perform operations on wishlist'));
9494
}
9595

96-
$wishlistId = ((int) $args['wishlist_id']) ?: null;
96+
$wishlistId = ((int) $args['wishlistId']) ?: null;
9797
$wishlist = $this->getWishlist($wishlistId, $customerId);
9898

9999
if (null === $wishlist->getId() || $customerId !== (int) $wishlist->getCustomerId()) {
100100
throw new GraphQlInputException(__('The wishlist was not found.'));
101101
}
102102

103-
$wishlistItemsIds = $args['wishlist_items_ids'];
103+
$wishlistItemsIds = $args['wishlistItemsIds'];
104104
$wishlistOutput = $this->removeProductsFromWishlist->execute($wishlist, $wishlistItemsIds);
105105

106106
if (!empty($wishlistItemsIds)) {

app/code/Magento/WishlistGraphQl/Model/Resolver/UpdateProductsInWishlist.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ public function resolve(
9393
throw new GraphQlAuthorizationException(__('The current user cannot perform operations on wishlist'));
9494
}
9595

96-
$wishlistId = ((int) $args['wishlist_id']) ?: null;
96+
$wishlistId = ((int) $args['wishlistId']) ?: null;
9797
$wishlist = $this->getWishlist($wishlistId, $customerId);
9898

9999
if (null === $wishlist->getId() || $customerId !== (int) $wishlist->getCustomerId()) {
100100
throw new GraphQlInputException(__('The wishlist was not found.'));
101101
}
102102

103-
$wishlistItems = $args['wishlist_items'];
103+
$wishlistItems = $args['wishlistItems'];
104104
$wishlistItems = $this->getWishlistItems($wishlistItems);
105105
$wishlistOutput = $this->updateProductsInWishlist->execute($wishlist, $wishlistItems);
106106

app/code/Magento/WishlistGraphQl/etc/schema.graphqls

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ type WishlistItem {
3434
}
3535

3636
type Mutation {
37-
addProductsToWishlist(wishlist_id: ID!, wishlist_items: [WishlistItemInput!]!): AddProductsToWishlistOutput @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\AddProductsToWishlist")
38-
removeProductsFromWishlist(wishlist_id: ID!, wishlist_items_ids: [ID!]!): RemoveProductsFromWishlistOutput @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\RemoveProductsFromWishlist")
39-
updateProductsInWishlist(wishlist_id: ID!, wishlist_items: [WishlistItemUpdateInput!]!): UpdateProductsInWishlistOutput @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\UpdateProductsInWishlist")
37+
addProductsToWishlist(wishlistId: ID!, wishlistItems: [WishlistItemInput!]!): AddProductsToWishlistOutput @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\AddProductsToWishlist")
38+
removeProductsFromWishlist(wishlistId: ID!, wishlistItemsIds: [ID!]!): RemoveProductsFromWishlistOutput @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\RemoveProductsFromWishlist")
39+
updateProductsInWishlist(wishlistId: ID!, wishlistItems: [WishlistItemUpdateInput!]!): UpdateProductsInWishlistOutput @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\UpdateProductsInWishlist")
4040
}
4141

4242
input WishlistItemInput {

0 commit comments

Comments
 (0)