Install
Works with Drupal: ^10.4 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Download tar.gz
51.1 KB
MD5: f247f5b4dc4a602dd9b77a20043305e1
SHA-1: 5ec6fb3eda8f5a73a0447fda6bfd88a2eedd3c5e
SHA-256: 4b19ca1fa6fcfd29978b335e39caa0e067eedac06460405fe59b17fbca798741
Download zip
121.69 KB
MD5: dd5ee794f94f39f32979cb347b8c4517
SHA-1: a385e9952360a7107b06dbe13322a1889adadf16
SHA-256: b0f216212e7148b3dbf77dbdee918612e63019d58c3a2a2f5639c566647109d0
Release notes
Cart, checkout and profile operations now follow the same rules as the Commerce cart and checkout forms. All sites using the Commerce GraphQL extensions should update.
Changes
- Cart queries and mutations resolve carts through the Commerce cart provider and entity access handlers.
commerceAddToCartvalidates that the quantity is a positive integer.- Quantity changes compute the stock delta from the item's current quantity, and a rejected quantity no longer changes the item.
- Cart and checkout responses are not cached.
Behaviour changes for API consumers
commerceGetCart,commerceGetCarts,commerceAddToCartandcommerceCheckoutonly act on the current user's or session's carts. Anaccount/accountIdargument other than the current user returns an error or an empty result.commerceGetCartsreturns the current user's carts; theorderTypeandstoreIdfilters still apply.- Cart mutations (
commerceAddToCart,commerceCartChangeQuantity,commerceRemoveFromCart,commerceEmptyCart,commerceApplyCoupon,commerceRemoveCoupon) only change active carts. Locked order items, such as items added by a promotion, cannot be changed or removed. commerceCheckoutrequires theaccess checkoutpermission and follows Commerce's checkout access rules. Customers can still open their own placed order, for example on the completion step.commerceEditProfileFormrequiresupdateaccess to the profile.CommerceProduct.variation(id:)only returns variations the user can view and otherwise falls back to the default variation.