Schema Documentation

cart

Description

The cart object

Response

Returns a Cart

Arguments
NameDescription
recalculateTotals - Boolean Should cart totals be recalculated.

Example

Query
query cart($recalculateTotals: Boolean) {  cart(recalculateTotals: $recalculateTotals){    appliedCoupons {      ...AppliedCouponFragment    }availableShippingMethods {      ...ShippingPackageFragment    }chosenShippingMethodscontents {      ...CartToCartItemConnectionFragment    }contentsTaxcontentsTotaldiscountTaxdiscountTotaldisplayPricesIncludeTaxfeeTaxfeeTotalfees {      ...CartFeeFragment    }isEmptyneedsShippingAddressshippingTaxshippingTotalsubtotalsubtotalTaxtotaltotalTaxtotalTaxes {      ...CartTaxFragment    }  }}
Variables
{"recalculateTotals":true}
Response
{"data":{"cart":{"appliedCoupons":[AppliedCoupon],"availableShippingMethods":[ShippingPackage],"chosenShippingMethods":["xyz789"],"contents":CartToCartItemConnection,"contentsTax":"xyz789","contentsTotal":"abc123","discountTax":"xyz789","discountTotal":"xyz789","displayPricesIncludeTax":true,"feeTax":"abc123","feeTotal":"abc123","fees":[CartFee],"isEmpty":true,"needsShippingAddress":false,"shippingTax":"abc123","shippingTotal":"abc123","subtotal":"xyz789","subtotalTax":"abc123","total":"abc123","totalTax":"abc123","totalTaxes":[CartTax]}}}