-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1bbf115
commit 93485f8
Showing
28 changed files
with
192 additions
and
319 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,89 +1,71 @@ | ||
const CREATE_EMPTY_CART = /* GraphQL */` | ||
const CREATE_EMPTY_CART = /* GraphQL */ ` | ||
mutation createEmptyCart($input: createEmptyCartInput) { | ||
createEmptyCart(input: $input) | ||
} | ||
`; | ||
|
||
const ADD_TO_CART = /* GraphQL */` | ||
mutation addProductsToCart( | ||
$cartId: String! | ||
$cartItems: [CartItemInput!]! | ||
) { | ||
addProductsToCart( | ||
cartId: $cartId | ||
cartItems: $cartItems | ||
) { | ||
cart { | ||
items { | ||
product { | ||
name | ||
sku | ||
} | ||
quantity | ||
const ADD_TO_CART = /* GraphQL */ ` | ||
mutation addProductsToCart($cartId: String!, $cartItems: [CartItemInput!]!) { | ||
addProductsToCart(cartId: $cartId, cartItems: $cartItems) { | ||
cart { | ||
items { | ||
product { | ||
name | ||
sku | ||
} | ||
quantity | ||
} | ||
} | ||
user_errors { | ||
code | ||
message | ||
} | ||
} | ||
user_errors { | ||
code | ||
message | ||
} | ||
} | ||
} | ||
} | ||
} | ||
`; | ||
|
||
const ADD_TO_WISHLIST = /* GraphQL */` | ||
mutation addProductsToWishlist( | ||
$wishlistId: ID! | ||
$wishlistItems: [WishlistItemInput!]! | ||
) { | ||
addProductsToWishlist( | ||
wishlistId: $wishlistId | ||
wishlistItems: $wishlistItems | ||
) { | ||
wishlist { | ||
id | ||
name | ||
items_count | ||
items_v2 { | ||
items { | ||
id | ||
product { | ||
uid | ||
const ADD_TO_WISHLIST = /* GraphQL */ ` | ||
mutation addProductsToWishlist($wishlistId: ID!, $wishlistItems: [WishlistItemInput!]!) { | ||
addProductsToWishlist(wishlistId: $wishlistId, wishlistItems: $wishlistItems) { | ||
wishlist { | ||
id | ||
name | ||
sku | ||
} | ||
items_count | ||
items_v2 { | ||
items { | ||
id | ||
product { | ||
uid | ||
name | ||
sku | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
`; | ||
|
||
const REMOVE_FROM_WISHLIST = /* GraphQL */` | ||
mutation removeProductsFromWishlist ( | ||
$wishlistId: ID! | ||
$wishlistItemsIds: [ID!]! | ||
) { | ||
removeProductsFromWishlist( | ||
wishlistId: $wishlistId | ||
wishlistItemsIds: $wishlistItemsIds | ||
) { | ||
wishlist { | ||
id | ||
name | ||
items_count | ||
items_v2 { | ||
items { | ||
id | ||
product { | ||
uid | ||
const REMOVE_FROM_WISHLIST = /* GraphQL */ ` | ||
mutation removeProductsFromWishlist($wishlistId: ID!, $wishlistItemsIds: [ID!]!) { | ||
removeProductsFromWishlist(wishlistId: $wishlistId, wishlistItemsIds: $wishlistItemsIds) { | ||
wishlist { | ||
id | ||
name | ||
sku | ||
} | ||
items_count | ||
items_v2 { | ||
items { | ||
id | ||
product { | ||
uid | ||
name | ||
sku | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
`; | ||
|
||
export { CREATE_EMPTY_CART, ADD_TO_CART, ADD_TO_WISHLIST, REMOVE_FROM_WISHLIST }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.