Skip to content

Missing wishlist endpoints from M2

License

Notifications You must be signed in to change notification settings

scandipwa/wishlist-graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ScandiPWA_WishlistGraphQl

WishlistGraphQl provides additional resolvers for wishlist, extending Magento_WishlistGraphQl.

SaveWishlistItem

This endpoint allows to save Wishlist item

mutation SaveWishlistItem($wishlistItem: WishlistItemInput!) {
    saveWishlistItem(wishlistItem: $wishlistItem) {
         id
         sku
         qty
         description
         added_at
         product
    }
}
{
   "wishlistItem": {
       "sku": "n31189077-1",
       "quantity": 2,
       "description": "Description",
       "product_option": {
           "extension_attributes": {}
       }
   }
}

RemoveProductFromWishlist

This endpoint allows removing item from wishlist

mutation RemoveProductFromWishlist($item_id: ID!) {
    removeProductFromWishlist(item_id: $item_id)
}
{
   "item_id": 1
}

MoveWishlistToCart

This endpoint allows to move all wishlist items to cart

mutation MoveWishlistToCart {
    moveWishlistToCart()
}

ClearWishlist

This endpoint allows to clear wishlist

mutation ClearWishlist {
    clearWishlist()
}