GetOrderDetails.ts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. giftcardNumber
  40. giftcardAmount
  41. baseGiftcardAmount
  42. baseCurrencyCode
  43. channelCurrencyCode
  44. orderCurrencyCode
  45. items {
  46. edges {
  47. node {
  48. id
  49. sku
  50. type
  51. name
  52. additional
  53. qtyOrdered
  54. qtyShipped
  55. qtyInvoiced
  56. qtyCanceled
  57. qtyRefunded
  58. price
  59. basePrice
  60. total
  61. baseTotal
  62. discountPercent
  63. discountAmount
  64. baseDiscountAmount
  65. }
  66. }
  67. }
  68. addresses {
  69. edges {
  70. node {
  71. id
  72. _id
  73. addressType
  74. orderId
  75. name
  76. firstName
  77. lastName
  78. companyName
  79. address
  80. city
  81. state
  82. country
  83. postcode
  84. useForShipping
  85. email
  86. phone
  87. defaultAddress
  88. createdAt
  89. updatedAt
  90. }
  91. }
  92. }
  93. createdAt
  94. updatedAt
  95. }
  96. }
  97. `;