mirror of
https://github.com/vercel/commerce.git
synced 2025-07-04 12:11:22 +00:00
* folder and env setup * codegen.json headers removed * use-cart code flow updated * use-cart code flow updated * Implemented get-cart functionality * removed unused file * getAnonymousShopperToken function added * normalization mapping updated * PR points resolved * Anonymous shopper token query added * getAnonymousShopperToken function added * Anonymous shopper token query added Co-authored-by: Chandradeepta <43542673+Chandradeepta@users.noreply.github.com>
55 lines
963 B
TypeScript
55 lines
963 B
TypeScript
export const getCartQuery = /* GraphQL */`
|
|
query cart {
|
|
currentCart {
|
|
id
|
|
userId
|
|
orderDiscounts {
|
|
impact
|
|
discount {
|
|
id
|
|
name
|
|
}
|
|
couponCode
|
|
}
|
|
subtotal
|
|
shippingTotal
|
|
total
|
|
items {
|
|
id
|
|
subtotal
|
|
unitPrice{
|
|
extendedAmount
|
|
}
|
|
product {
|
|
productCode
|
|
variationProductCode
|
|
name
|
|
description
|
|
imageUrl
|
|
options {
|
|
attributeFQN
|
|
name
|
|
value
|
|
}
|
|
properties {
|
|
attributeFQN
|
|
name
|
|
values {
|
|
value
|
|
}
|
|
}
|
|
sku
|
|
price {
|
|
price
|
|
salePrice
|
|
}
|
|
categories {
|
|
id
|
|
}
|
|
}
|
|
quantity
|
|
}
|
|
}
|
|
}
|
|
`
|