GetOrderDetails.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. status
  8. channelName
  9. customerEmail
  10. customerFirstName
  11. customerLastName
  12. payment {
  13. method
  14. methodTitle
  15. }
  16. shippingMethod
  17. shippingTitle
  18. couponCode
  19. totalItemCount
  20. totalQtyOrdered
  21. grandTotal
  22. baseGrandTotal
  23. grandTotalInvoiced
  24. grandTotalRefunded
  25. subTotal
  26. baseSubTotal
  27. taxAmount
  28. baseTaxAmount
  29. discountAmount
  30. baseDiscountAmount
  31. shippingAmount
  32. baseShippingAmount
  33. baseCurrencyCode
  34. channelCurrencyCode
  35. orderCurrencyCode
  36. items {
  37. edges {
  38. node {
  39. id
  40. sku
  41. type
  42. name
  43. additional
  44. qtyOrdered
  45. qtyShipped
  46. qtyInvoiced
  47. qtyCanceled
  48. qtyRefunded
  49. price
  50. basePrice
  51. total
  52. baseTotal
  53. discountPercent
  54. discountAmount
  55. baseDiscountAmount
  56. }
  57. }
  58. }
  59. addresses {
  60. edges {
  61. node {
  62. id
  63. _id
  64. addressType
  65. orderId
  66. name
  67. firstName
  68. lastName
  69. companyName
  70. address
  71. city
  72. state
  73. country
  74. postcode
  75. useForShipping
  76. email
  77. phone
  78. defaultAddress
  79. createdAt
  80. updatedAt
  81. }
  82. }
  83. }
  84. createdAt
  85. updatedAt
  86. }
  87. }
  88. `;