diff --git a/vendor/magento/module-wishlist-graph-ql/Model/Resolver/WishlistItems.php b/vendor/magento/module-wishlist-graph-ql/Model/Resolver/WishlistItems.php index bf9fe187..c61fe833 100644 --- a/vendor/magento/module-wishlist-graph-ql/Model/Resolver/WishlistItems.php +++ b/vendor/magento/module-wishlist-graph-ql/Model/Resolver/WishlistItems.php @@ -49,20 +49,21 @@ class WishlistItems implements ResolverInterface * @inheritdoc */ public function resolve( Field $field, $context, ResolveInfo $info, array $value = null, array $args = null ) { if (!isset($value['model'])) { + return; throw new LocalizedException(__('Missing key "model" in Wishlist value data')); } /** @var Wishlist $wishlist */ $wishlist = $value['model']; /** @var WishlistItemCollection $wishlistItemCollection */ $wishlistItemsCollection = $this->getWishListItems($wishlist, $args); $wishlistItems = $wishlistItemsCollection->getItems(); $data = []; diff --git a/vendor/magento/module-wishlist-graph-ql/Model/Resolver/WishlistItemsResolver.php b/vendor/magento/module-wishlist-graph-ql/Model/Resolver/WishlistItemsResolver.php index 36a03da2..54512ff1 100644 --- a/vendor/magento/module-wishlist-graph-ql/Model/Resolver/WishlistItemsResolver.php +++ b/vendor/magento/module-wishlist-graph-ql/Model/Resolver/WishlistItemsResolver.php @@ -49,20 +49,21 @@ class WishlistItemsResolver implements ResolverInterface * @inheritdoc */ public function resolve( Field $field, $context, ResolveInfo $info, array $value = null, array $args = null ) { if (!isset($value['model'])) { + return; throw new LocalizedException(__('Missing key "model" in Wishlist value data')); } /** @var Wishlist $wishlist */ $wishlist = $value['model']; $wishlistItems = $this->getWishListItems($wishlist); $data = []; foreach ($wishlistItems as $wishlistItem) { $data[] = [