RemoveCartItem.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import { gql, TypedDocumentNode } from "@apollo/client";
  2. import { RemoveCartItemData } from "@/types/cart/type";
  3. export const REMOVE_CART_ITEM: TypedDocumentNode<RemoveCartItemData> = gql`
  4. mutation RemoveCartItem( $cartItemId: Int! ) {
  5. createRemoveCartItem(input: { cartItemId: $cartItemId }) {
  6. removeCartItem {
  7. id
  8. appliedTaxes
  9. itemsQty
  10. isGuest
  11. itemsCount
  12. items {
  13. edges {
  14. node {
  15. id
  16. cartId
  17. productId
  18. name
  19. price
  20. baseImage
  21. sku
  22. quantity
  23. type
  24. productUrlKey
  25. canChangeQty
  26. }
  27. }
  28. }
  29. subtotal
  30. subTotalInclTax
  31. discountAmount
  32. taxAmount
  33. taxTotal
  34. shippingAmount
  35. shippingAmountInclTax
  36. grandTotal
  37. formattedSubtotal
  38. formattedSubTotalInclTax
  39. formattedDiscountAmount
  40. formattedTaxAmount
  41. formattedTaxTotal
  42. formattedShippingAmount
  43. formattedShippingAmountInclTax
  44. formattedGrandTotal
  45. couponCode
  46. selectedShippingRate
  47. selectedShippingRateTitle
  48. paymentMethod
  49. paymentMethodTitle
  50. haveStockableItems
  51. billingAddress
  52. shippingAddress
  53. }
  54. }
  55. }
  56. `;