mirror of
https://github.com/vercel/commerce.git
synced 2025-07-26 19:51:23 +00:00
✨ feat: useGetActiveOrderForCheckout
:%s
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
export const getActiveOrderForCheckoutQuery = /* GraphQL */ `
|
||||
query getActiveOrderForCheckout {
|
||||
activeOrder {
|
||||
...Cart
|
||||
shippingAddress {
|
||||
...OrderAddress
|
||||
__typename
|
||||
}
|
||||
__typename
|
||||
}
|
||||
}
|
||||
|
||||
fragment Cart on Order {
|
||||
id
|
||||
code
|
||||
state
|
||||
active
|
||||
customer {
|
||||
id
|
||||
firstName
|
||||
lastName
|
||||
emailAddress
|
||||
}
|
||||
lines {
|
||||
id
|
||||
featuredAsset {
|
||||
...Asset
|
||||
__typename
|
||||
}
|
||||
unitPrice
|
||||
unitPriceWithTax
|
||||
quantity
|
||||
linePriceWithTax
|
||||
discountedLinePriceWithTax
|
||||
unitPriceWithTax
|
||||
discountedUnitPriceWithTax
|
||||
productVariant {
|
||||
id
|
||||
name
|
||||
price
|
||||
priceWithTax
|
||||
stockLevel
|
||||
productId
|
||||
product {
|
||||
slug
|
||||
}
|
||||
__typename
|
||||
}
|
||||
discounts {
|
||||
amount
|
||||
amountWithTax
|
||||
description
|
||||
adjustmentSource
|
||||
type
|
||||
__typename
|
||||
}
|
||||
__typename
|
||||
}
|
||||
totalQuantity
|
||||
subTotal
|
||||
subTotalWithTax
|
||||
total
|
||||
totalWithTax
|
||||
shipping
|
||||
shippingWithTax
|
||||
currencyCode
|
||||
shippingLines {
|
||||
priceWithTax
|
||||
shippingMethod {
|
||||
id
|
||||
code
|
||||
name
|
||||
description
|
||||
__typename
|
||||
}
|
||||
__typename
|
||||
}
|
||||
discounts {
|
||||
amount
|
||||
amountWithTax
|
||||
description
|
||||
adjustmentSource
|
||||
type
|
||||
__typename
|
||||
}
|
||||
__typename
|
||||
}
|
||||
|
||||
fragment Asset on Asset {
|
||||
id
|
||||
width
|
||||
height
|
||||
name
|
||||
preview
|
||||
focalPoint {
|
||||
x
|
||||
y
|
||||
__typename
|
||||
}
|
||||
__typename
|
||||
}
|
||||
|
||||
fragment OrderAddress on OrderAddress {
|
||||
fullName
|
||||
company
|
||||
streetLine1
|
||||
streetLine2
|
||||
city
|
||||
province
|
||||
postalCode
|
||||
country
|
||||
phoneNumber
|
||||
__typename
|
||||
}
|
||||
`
|
||||
|
Reference in New Issue
Block a user