All Release Notes
Improvements to working with Business Units in the GraphQL API
7 December 2022
Composable Commerce
HTTP API
Enhancement
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
AssociateRole
to free up the namespace for new functionality.
Changes:
- [GraphQL API] Changed the
Cart
type:- Added the
businessUnitRef
field to theCart
type. Cart.businessUnit
field type changed fromKeyReference
toBusinessUnit
- Added the
- [GraphQL API] Changed the
Order
type:Order.businessUnit
field type changed fromKeyReference
toBusinessUnit
- Added the
businessUnitRef
field to theOrder
type.
- [GraphQL API] Changed the
CartDraft
type:- Input field
businessUnit
was added toCartDraft
type
- Input field
- [GraphQL API] Changed the
MyCartDraft
type:- Input field
businessUnit
was added toMyCartDraft
type
- 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
Associate
type:Associate.roles
field type changed from[AssociateRole!]!
to[SimpleAssociateRole!]!
- [GraphQL API] Changed the
AssociateDraft
type:AssociateDraft.roles
input 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 {AdminBuyer}