7 December 2022
GraphQLCartsOrdersB2B
We have made several improvements and changes to the Business Units functionality in GraphQL:
- Carts and Orders now support Reference Expansion on Business Unit.
- Added support for creating Carts that reference a Business Unit.
- Changed the naming of the type
AssociateRoleto free up the namespace for new functionality.
Changes:
- [GraphQL API] Changed the
Carttype:- Added the
businessUnitReffield to theCarttype. Cart.businessUnitfield type changed fromKeyReferencetoBusinessUnit
- Added the
- [GraphQL API] Changed the
Ordertype:Order.businessUnitfield type changed fromKeyReferencetoBusinessUnit- Added the
businessUnitReffield to theOrdertype.
- [GraphQL API] Changed the
CartDrafttype:- Input field
businessUnitwas added toCartDrafttype
- Input field
- [GraphQL API] Changed the
MyCartDrafttype:- Input field
businessUnitwas added toMyCartDrafttype
- Input field
- [GraphQL API] Added the following types to the GraphQL schema:
SimpleAssociateRole - [GraphQL API] Removed the following types from the GraphQL schema:
AssociateRole. - [GraphQL API] Changed the
Associatetype:Associate.rolesfield type changed from[AssociateRole!]!to[SimpleAssociateRole!]!
- [GraphQL API] Changed the
AssociateDrafttype:AssociateDraft.rolesinput field type changed from[AssociateRole!]!to[SimpleAssociateRole!]!
The following changes were introduced in terms of GraphQL SDL:
extend type Cart {
businessUnitRef: KeyReference
}
extend type Order {
businessUnitRef: KeyReference
}
extend input MyCartDraft {
businessUnit: ResourceIdentifierInput
}
extend input CartDraft {
businessUnit: ResourceIdentifierInput
}
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
enum SimpleAssociateRole {
Admin
Buyer
}