GetCartItem.ts 1.9 KB

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