All Release Notes

Replaced ProductSelectionType with ProductSelectionMode

18 April 2023
Announcement
Product CatalogGraphQLDeprecation

We introduced a new type ProductSelectionMode to replace ProductSelectionType. The functionality of Individual and IndividualExclusion Product Selections remains the same. We adjusted the naming of the type and the enums to ensure a consistent experience when working with the Composable Commerce APIs.

Instead of the previous individual and individualExclusion enums defined by the type field on ProductSelection, you can now use the mode field with the values Individual and IndividualExclusion. The type field, alongside ProductSelectionType is now deprecated and will be completely removed on 18 July 2023.

We also aligned the behavior of ProductSelectionCreated Message with other similar Messages generated by resource creation. The Message now includes the entire ProductSelection object in the payload, instead of a subset of the fields.

Changes:

  • [API] Added the mode field to ProductSelection and ProductSelectionDraft.
  • [API] Deprecated ProductSelectionTypeEnum, IndividualProductSelectionType, IndividualExclusionProductSelectionType from ProductSelection.
  • [API] Deprecated the type field from ProductSelection and ProductSelectionDraft.
  • [API] Changed the type of productSelection field on ProductSelectionCreated Message from ProductSelectionType to ProductSelection.
  • [GraphQL API] Removed the following types from the GraphQL schema: ProductSelectionType, IndividualExclusionProductSelectionCreatedPayload, IndividualProductSelectionCreatedPayload, ProductSelectionCreatedPayload.
  • [GraphQL API] Changed the ProductSelection type:
    • Removed the type field from the ProductSelection type.
    • Added the mode field to the ProductSelection type.
  • [GraphQL API] Changed the CreateProductSelectionDraft type:
    • Input field type was removed from CreateProductSelectionDraft type
    • Input field mode was added to CreateProductSelectionDraft type
  • [GraphQL API] Changed the ProductSelectionCreated type:
    • ProductSelectionCreated.productSelection field type changed from ProductSelectionCreatedPayload! to ProductSelection!

The following changes were introduced in terms of GraphQL SDL:

extend type ProductSelection {
mode: ProductSelectionMode!
}
extend input CreateProductSelectionDraft {
mode: ProductSelectionMode
}
enum ProductSelectionMode {
"Mode of Product Selection used to include a specific list of individual Products"
Individual
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta. Mode of Product Selection used to exclude a specific list of individual Products"
IndividualExclusion
}