Skip to main content
Version: 2.0.0

Cart Queries

Operations registered in src/gql/queries/cart/*.

Available Queries

How To Use These Queries

  • Use cart for the live cart state in frontend checkout flows.
  • Use allCartRules for optional campaign/promo UI where you want to show available cart rules.
  • Always keep and reuse the latest cartId returned by cart mutations.

Notes

  • cart will throw an error when the quote behind that cartId was already converted to an order.
  • The siteId argument on cart is optional; if omitted, plugin defaults are used.
  • allCartRules currently returns static/mock-like data in plugin code and is marked with a TODO.