All Release Notes

Add Channel GraphQL mutations

3 January 2020
Composable Commerce
HTTP API
Enhancement
GraphQL
  • [GraphQL API] Changed the Mutation type:
    • Added the createChannel field to the Mutation type.
    • Added the updateChannel field to the Mutation type.
    • Added the deleteChannel field to the Mutation type.
  • [GraphQL API] Added the following types to the GraphQL schema: ChannelDraft, GeometryInput, ChannelUpdateAction, SetChannelRoles, AddChannelRoles, RemoveChannelRoles, ChangeChannelDescription, ChangeChannelKey, ChangeChannelName, SetChannelAddress, SetChannelCustomField, SetChannelCustomType, SetChannelGeoLocation.

Introduced the following changes to the GraphQL schema (in SDL format):

extend type Mutation {
createChannel(draft: ChannelDraft!): Channel
updateChannel(id: String!, version: Long!, actions: [ChannelUpdateAction!]!): Channel
deleteChannel(id: String!, version: Long!): Channel
}
input ChannelDraft {
key: String!
roles: [ChannelRole!]!
name: [LocalizedStringItemInputType!]
description: [LocalizedStringItemInputType!]
custom: CustomFieldsDraft
address: AddressInput
geoLocation: GeometryInput
}
input GeometryInput {
type: String!
coordinates: [Float!]
}
input ChannelUpdateAction {
setRoles: SetChannelRoles
addRoles: AddChannelRoles
removeRoles: RemoveChannelRoles
changeDescription: ChangeChannelDescription
changeKey: ChangeChannelKey
changeName: ChangeChannelName
setAddress: SetChannelAddress
setCustomField: SetChannelCustomField
setCustomType: SetChannelCustomType
setGeoLocation: SetChannelGeoLocation
}
input SetChannelRoles {
roles: [ChannelRole!]!
}
input AddChannelRoles {
roles: [ChannelRole!]!
}
input RemoveChannelRoles {
roles: [ChannelRole!]!
}
input ChangeChannelDescription {
description: [LocalizedStringItemInputType!]
}
input ChangeChannelKey {
key: String!
}
input ChangeChannelName {
name: [LocalizedStringItemInputType!]
}
input SetChannelAddress {
address: AddressInput
}
input SetChannelCustomField {
name: String!
value: String
}
input SetChannelCustomType {
fields: [CustomFieldInput!]
type: ResourceIdentifierInput
typeKey: String
typeId: String
}
input SetChannelGeoLocation {
geoLocation: GeometryInput
}