10 November 2021
GraphQLOrdersMessages/Subscriptions
With the Set ReturnInfo update action, you can now delete and overwrite multiple entries in the returnInfo
array field of Order in a single request.
Previously, to remove an entry from the returnInfo
field, it was necessary to use the Add ReturnInfo update action with a negative quantity.
The Set ReturnInfo update action triggers the ReturnInfoSet Message.
Changes:
- [API] Added Set ReturnInfo update action to Orders.
- [API] Added Set ReturnInfo update action to Order Edits.
- [API] Added ReturnInfoSet Message.
- [GraphQL API] Added the following types to the GraphQL schema:
ReturnInfoDraftType
,ReturnInfoDraftTypeOutput
,ReturnInfoSet
,SetOrderReturnInfo
,SetStagedOrderReturnInfo
,SetStagedOrderReturnInfoOutput
. - [GraphQL API] Changed the
StagedOrderUpdateAction
type:- Input field
setReturnInfo
was added toStagedOrderUpdateAction
type
- Input field
- [GraphQL API] Changed the
OrderUpdateAction
type:- Input field
setReturnInfo
was added toOrderUpdateAction
type
- Input field
The following changes were introduced in terms of GraphQL SDL:
extend input StagedOrderUpdateAction {
setReturnInfo: SetStagedOrderReturnInfo
}
extend input OrderUpdateAction {
setReturnInfo: SetOrderReturnInfo
}
input ReturnInfoDraftType {
items: [ReturnItemDraftType!]!
returnDate: DateTime
returnTrackingId: String
}
type ReturnInfoDraftTypeOutput {
items: [ReturnItemDraftTypeOutput!]!
returnDate: DateTime
returnTrackingId: String
}
type ReturnInfoSet implements MessagePayload {
returnInfo: [ReturnInfo!]!
type: String!
}
input SetOrderReturnInfo {
items: [ReturnInfoDraftType!]!
}
input SetStagedOrderReturnInfo {
items: [ReturnInfoDraftType!]!
}
type SetStagedOrderReturnInfoOutput implements StagedOrderUpdateActionOutput {
type: String!
items: [ReturnInfoDraftTypeOutput!]!
}