20 December 2021
GraphQLOrdersExtensibility
You can now extend the Delivery object on the Order resource with Custom Fields.
With these you can, for example, add meta data associated with your ERP system to the deliveries of the Orders.
Changes:
- [API] Added
customfield to Delivery. - [API] Added update actions Set Delivery Custom Type and Set Delivery CustomField to the Order.
- [GraphQL API] Added the following types to the GraphQL schema:
SetOrderDeliveryCustomField,SetOrderDeliveryCustomType,SetStagedOrderDeliveryCustomField,SetStagedOrderDeliveryCustomFieldOutput,SetStagedOrderDeliveryCustomType,SetStagedOrderDeliveryCustomTypeOutput. - [GraphQL API] Changed the
AddOrderDeliverytype:- Input field
customwas added toAddOrderDeliverytype
- Input field
- [GraphQL API] Changed the
Deliverytype:- Added the
customfield to theDeliverytype.
- Added the
- [GraphQL API] Changed the
AddStagedOrderDeliverytype:- Input field
customwas added toAddStagedOrderDeliverytype
- Input field
- [GraphQL API] Changed the
StagedOrderUpdateActiontype:- Input field
setDeliveryCustomFieldwas added toStagedOrderUpdateActiontype - Input field
setDeliveryCustomTypewas added toStagedOrderUpdateActiontype
- Input field
- [GraphQL API] Changed the
AddStagedOrderDeliveryOutputtype:- Added the
customfield to theAddStagedOrderDeliveryOutputtype.
- Added the
- [GraphQL API] Changed the
OrderUpdateActiontype:- Input field
setDeliveryCustomTypewas added toOrderUpdateActiontype - Input field
setDeliveryCustomFieldwas added toOrderUpdateActiontype
- Input field
The following changes were introduced in terms of GraphQL SDL:
extend type Delivery {
custom: CustomFieldsType
}
extend type AddStagedOrderDeliveryOutput {
custom: CustomFieldsCommand
}
extend input AddOrderDelivery {
custom: CustomFieldsDraft
}
extend input AddStagedOrderDelivery {
custom: CustomFieldsDraft
}
extend input StagedOrderUpdateAction {
setDeliveryCustomField: SetStagedOrderDeliveryCustomField
setDeliveryCustomType: SetStagedOrderDeliveryCustomType
}
extend input OrderUpdateAction {
setDeliveryCustomField: SetOrderDeliveryCustomField
setDeliveryCustomType: SetOrderDeliveryCustomType
}
input SetOrderDeliveryCustomField {
name: String!
value: String
deliveryId: String!
}
input SetOrderDeliveryCustomType {
fields: [CustomFieldInput!]
type: ResourceIdentifierInput
typeKey: String
typeId: String
deliveryId: String!
}
input SetStagedOrderDeliveryCustomField {
name: String!
value: String
deliveryId: String!
}
type SetStagedOrderDeliveryCustomFieldOutput implements StagedOrderUpdateActionOutput {
type: String!
name: String!
value: Json
deliveryId: String!
}
input SetStagedOrderDeliveryCustomType {
fields: [CustomFieldInput!]
type: ResourceIdentifierInput
typeKey: String
typeId: String
deliveryId: String!
}
type SetStagedOrderDeliveryCustomTypeOutput implements StagedOrderUpdateActionOutput {
type: String!
custom: CustomFieldsCommand!
deliveryId: String!
}