Cart Queries
Operations registered in src/gql/queries/cart/*.
Available Queries
- CartQuery
Operation:
cart(cartId: String!, siteId: Int) - CartRulesQuery
Operation:
allCartRules
How To Use These Queries
- Use
cartfor the live cart state in frontend checkout flows. - Use
allCartRulesfor optional campaign/promo UI where you want to show available cart rules. - Always keep and reuse the latest
cartIdreturned by cart mutations.
Notes
cartwill throw an error when the quote behind thatcartIdwas already converted to an order.- The
siteIdargument oncartis optional; if omitted, plugin defaults are used. allCartRulescurrently returns static/mock-like data in plugin code and is marked with a TODO.