22 July 2022
CartsPricing and DiscountsGraphQL
You can now set a price mode on a CustomLineItem that controls whether Cart Discounts should be applied to them by Composable Commerce or not. Use this if you want to control application of Cart Discounts for each Custom Line Item in the Cart individually.
For backwards compatibility, 
Standard is the default price mode for newly created Custom Line Items, that allows application of Cart Discounts. For cases where Cart Discounts should not be considered on a Custom Line Item, you can change its price mode to External via new update action. You can still overwrite the price for a Custom Line Item via Change CustomLineItem Money update action.Changes:
- [API] Added field 
priceModeto CustomLineItem. - [API] Added Change CustomLineItem Price Mode update action to Carts.
 - [GraphQL API] Added the following types to the GraphQL schema: 
ChangeCartCustomLineItemPriceMode,CustomLineItemPriceMode. - [GraphQL API] Changed the 
CartUpdateActiontype:- Input field 
changeCustomLineItemPriceModewas added toCartUpdateActiontype 
 - Input field 
 - [GraphQL API] Changed the 
CustomLineItemtype:- Added the 
priceModefield to theCustomLineItemtype. 
 - Added the 
 - [GraphQL API] Changed the 
TypeDefinitiontype:TypeDefinitiontype description is changed
 
The following changes were introduced in terms of GraphQL SDL:
extend type CustomLineItem {
  priceMode: CustomLineItemPriceMode!
}
extend input CartUpdateAction {
  changeCustomLineItemPriceMode: ChangeCartCustomLineItemPriceMode
}
input ChangeCartCustomLineItemPriceMode {
  customLineItemId: String!
  mode: CustomLineItemPriceMode!
}
enum CustomLineItemPriceMode {
  "Cart discounts are deactivated for the custom line items with this price mode."
  External
  "This is the default mode."
  Standard
}