GetOrderDetails.ts 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. import { gql,TypedDocumentNode } from "@apollo/client";
  2. import { OrderDetailsData } from "@/types/customer/type";
  3. export const GET_ORDER_DETAILS: TypedDocumentNode<OrderDetailsData> = gql`
  4. query GetCustomerOrder($id: ID!) {
  5. customerOrder(id: $id) {
  6. incrementId
  7. id
  8. _id
  9. status
  10. channelName
  11. customerEmail
  12. customerFirstName
  13. customerLastName
  14. payment {
  15. method
  16. methodTitle
  17. }
  18. shippingMethod
  19. shippingTitle
  20. couponCode
  21. totalItemCount
  22. totalQtyOrdered
  23. grandTotal
  24. baseGrandTotal
  25. grandTotalInvoiced
  26. grandTotalRefunded
  27. subTotal
  28. baseSubTotal
  29. taxAmount
  30. baseTaxAmount
  31. discountAmount
  32. baseDiscountAmount
  33. shippingAmount
  34. baseShippingAmount
  35. vipPlusAmount
  36. vipDiscountAmount
  37. baseVipPlusAmount
  38. baseVipDiscountAmount
  39. rewardPointsUsed
  40. rewardPointsAmount
  41. baseRewardPointsAmount
  42. rewardPointsInvoiced
  43. baseRewardPointsInvoiced
  44. rewardPointsEarned
  45. shippingInsuranceAmount
  46. baseShippingInsuranceAmount
  47. shippingInsuranceInvoiced
  48. baseShippingInsuranceInvoiced
  49. giftcardNumber
  50. giftcardAmount
  51. baseGiftcardAmount
  52. baseCurrencyCode
  53. channelCurrencyCode
  54. orderCurrencyCode
  55. items {
  56. edges {
  57. node {
  58. id
  59. sku
  60. type
  61. name
  62. additional
  63. qtyOrdered
  64. qtyShipped
  65. qtyInvoiced
  66. qtyCanceled
  67. qtyRefunded
  68. price
  69. basePrice
  70. total
  71. baseTotal
  72. discountPercent
  73. discountAmount
  74. baseDiscountAmount
  75. }
  76. }
  77. }
  78. addresses {
  79. edges {
  80. node {
  81. id
  82. _id
  83. addressType
  84. orderId
  85. name
  86. firstName
  87. lastName
  88. companyName
  89. address
  90. city
  91. state
  92. country
  93. postcode
  94. useForShipping
  95. email
  96. phone
  97. defaultAddress
  98. createdAt
  99. updatedAt
  100. }
  101. }
  102. }
  103. createdAt
  104. updatedAt
  105. }
  106. }
  107. `;