18 April 2023
Product catalogGraphQL
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
modefield to ProductSelection and ProductSelectionDraft. - [API] Deprecated
ProductSelectionTypeEnum,IndividualProductSelectionType,IndividualExclusionProductSelectionTypefrom ProductSelection. - [API] Deprecated the
typefield from ProductSelection and ProductSelectionDraft. - [API] Changed the type of
productSelectionfield 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
ProductSelectiontype:- Removed the
typefield from theProductSelectiontype. - Added the
modefield to theProductSelectiontype.
- Removed the
- [GraphQL API] Changed the
CreateProductSelectionDrafttype:- Input field
typewas removed fromCreateProductSelectionDrafttype - Input field
modewas added toCreateProductSelectionDrafttype
- Input field
- [GraphQL API] Changed the
ProductSelectionCreatedtype:ProductSelectionCreated.productSelectionfield type changed fromProductSelectionCreatedPayload!toProductSelection!
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
}