Chloe 3cdc94d0ce
fix: simplify logic core-charge
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
2024-06-12 10:20:28 +07:00

57 lines
1.0 KiB
TypeScript

import productFragment from './product';
const cartFragment = /* GraphQL */ `
fragment cart on Cart {
id
checkoutUrl
cost {
subtotalAmount {
amount
currencyCode
}
totalAmount {
amount
currencyCode
}
totalTaxAmount {
amount
currencyCode
}
}
lines(first: 100) {
edges {
node {
id
quantity
cost {
totalAmount {
amount
currencyCode
}
}
merchandise {
... on ProductVariant {
id
title
selectedOptions {
name
value
}
product {
...product
}
coreVariantId: metafield(key: "coreVariant", namespace: "custom") {
value
}
}
}
}
}
}
totalQuantity
}
${productFragment}
`;
export default cartFragment;