GetCartItem.ts 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. import { gql, type TypedDocumentNode } from "@apollo/client";
  2. import type { GetCartItemData } from "@/types/cart/type";
  3. export const GET_CART_ITEM: TypedDocumentNode<GetCartItemData> = gql`
  4. mutation GetCartItem {
  5. createReadCart(input: {}) {
  6. readCart {
  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. options
  27. }
  28. }
  29. }
  30. earnableRewardPoints
  31. rewardPoints
  32. rewardPointsUsed
  33. rewardPointsAmount
  34. baseRewardPointsAmount
  35. formattedRewardPointsAmount
  36. useShippingInsurance
  37. shippingInsuranceEnabled
  38. shippingInsuranceName
  39. shippingInsuranceType
  40. shippingInsuranceValue
  41. shippingInsuranceAmount
  42. baseShippingInsuranceAmount
  43. formattedShippingInsuranceAmount
  44. isVip
  45. vipDiscountAmount
  46. formattedVipDiscountAmount
  47. giftcardNumber
  48. subtotal
  49. subTotalInclTax
  50. discountAmount
  51. giftcardAmount
  52. vipPlusAmount
  53. vipExpireDate
  54. taxAmount
  55. taxTotal
  56. shippingAmount
  57. shippingAmountInclTax
  58. grandTotal
  59. formattedSubtotal
  60. formattedSubTotalInclTax
  61. formattedGiftcardAmount
  62. formattedDiscountAmount
  63. formattedVipPlusAmount
  64. formattedTaxAmount
  65. formattedTaxTotal
  66. formattedShippingAmount
  67. formattedShippingAmountInclTax
  68. formattedGrandTotal
  69. couponCode
  70. selectedShippingRate
  71. selectedShippingRateTitle
  72. paymentMethod
  73. paymentMethodTitle
  74. haveStockableItems
  75. billingAddress
  76. shippingAddress
  77. }
  78. }
  79. }
  80. `;