Back cart with GraphQL storage
This commit is contained in:
18
graphql/operations/cart/add-product-to-cart.graphql
Normal file
18
graphql/operations/cart/add-product-to-cart.graphql
Normal file
@@ -0,0 +1,18 @@
|
||||
mutation AddProductToCart($productId: ID!) {
|
||||
addProductToCart(productId: $productId) {
|
||||
id
|
||||
userId
|
||||
deliveryAddressId
|
||||
items {
|
||||
id
|
||||
productId
|
||||
productName
|
||||
sku
|
||||
isCustomizable
|
||||
quantity
|
||||
parameters
|
||||
updatedAt
|
||||
}
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
18
graphql/operations/cart/clear-cart.graphql
Normal file
18
graphql/operations/cart/clear-cart.graphql
Normal file
@@ -0,0 +1,18 @@
|
||||
mutation ClearCart {
|
||||
clearCart {
|
||||
id
|
||||
userId
|
||||
deliveryAddressId
|
||||
items {
|
||||
id
|
||||
productId
|
||||
productName
|
||||
sku
|
||||
isCustomizable
|
||||
quantity
|
||||
parameters
|
||||
updatedAt
|
||||
}
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
18
graphql/operations/cart/my-cart.graphql
Normal file
18
graphql/operations/cart/my-cart.graphql
Normal file
@@ -0,0 +1,18 @@
|
||||
query MyCart {
|
||||
myCart {
|
||||
id
|
||||
userId
|
||||
deliveryAddressId
|
||||
items {
|
||||
id
|
||||
productId
|
||||
productName
|
||||
sku
|
||||
isCustomizable
|
||||
quantity
|
||||
parameters
|
||||
updatedAt
|
||||
}
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
18
graphql/operations/cart/remove-cart-item.graphql
Normal file
18
graphql/operations/cart/remove-cart-item.graphql
Normal file
@@ -0,0 +1,18 @@
|
||||
mutation RemoveCartItem($productId: ID!) {
|
||||
removeCartItem(productId: $productId) {
|
||||
id
|
||||
userId
|
||||
deliveryAddressId
|
||||
items {
|
||||
id
|
||||
productId
|
||||
productName
|
||||
sku
|
||||
isCustomizable
|
||||
quantity
|
||||
parameters
|
||||
updatedAt
|
||||
}
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
18
graphql/operations/cart/set-cart-delivery-address.graphql
Normal file
18
graphql/operations/cart/set-cart-delivery-address.graphql
Normal file
@@ -0,0 +1,18 @@
|
||||
mutation SetCartDeliveryAddress($addressId: ID) {
|
||||
setCartDeliveryAddress(addressId: $addressId) {
|
||||
id
|
||||
userId
|
||||
deliveryAddressId
|
||||
items {
|
||||
id
|
||||
productId
|
||||
productName
|
||||
sku
|
||||
isCustomizable
|
||||
quantity
|
||||
parameters
|
||||
updatedAt
|
||||
}
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
18
graphql/operations/cart/update-cart-item-quantity.graphql
Normal file
18
graphql/operations/cart/update-cart-item-quantity.graphql
Normal file
@@ -0,0 +1,18 @@
|
||||
mutation UpdateCartItemQuantity($input: UpdateCartItemQuantityInput!) {
|
||||
updateCartItemQuantity(input: $input) {
|
||||
id
|
||||
userId
|
||||
deliveryAddressId
|
||||
items {
|
||||
id
|
||||
productId
|
||||
productName
|
||||
sku
|
||||
isCustomizable
|
||||
quantity
|
||||
parameters
|
||||
updatedAt
|
||||
}
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user