mirror of
https://github.com/vercel/commerce.git
synced 2025-07-03 19:51:22 +00:00
59 lines
924 B
TypeScript
59 lines
924 B
TypeScript
export const cartDetailsFragment = /* GraphQL */ `
|
|
fragment cartDetails on Cart {
|
|
id
|
|
checkoutUrl
|
|
createdAt
|
|
updatedAt
|
|
lines(first: 10) {
|
|
edges {
|
|
node {
|
|
id
|
|
merchandise {
|
|
... on ProductVariant {
|
|
id
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
attributes {
|
|
key
|
|
value
|
|
}
|
|
buyerIdentity {
|
|
email
|
|
customer {
|
|
id
|
|
}
|
|
}
|
|
estimatedCost {
|
|
totalAmount {
|
|
amount
|
|
currencyCode
|
|
}
|
|
subtotalAmount {
|
|
amount
|
|
currencyCode
|
|
}
|
|
totalTaxAmount {
|
|
amount
|
|
currencyCode
|
|
}
|
|
totalDutyAmount {
|
|
amount
|
|
currencyCode
|
|
}
|
|
}
|
|
}
|
|
`
|
|
|
|
const getCartQuery = /* GraphQL */ `
|
|
query getCart($cartId: ID!) {
|
|
node(id: $cartId) {
|
|
...cartDetails
|
|
}
|
|
}
|
|
${cartDetailsFragment}
|
|
`
|
|
export default getCartQuery
|