All Release Notes
States GraphQL Mutations
17 February 2020
Enhancement
CustomizationGraphQL
States can now be modified using the GraphQL API.
[GraphQL API] Added the following types to the GraphQL schema:
StateDraft
,StateUpdateAction
,AddStateRoles
,ChangeStateInitial
,ChangeStateKey
,ChangeStateType
,SetStateDescription
,SetStateName
,SetStateRoles
,SetStateTransitions
,RemoveStateRoles
.[GraphQL API] Changed the
Mutation
type:- Added the
createState
field to theMutation
type. - Added the
updateState
field to theMutation
type. - Added the
deleteState
field to theMutation
type.
- Added the
Introduced the following changes to the GraphQL schema (in SDL format):
extend type Mutation {createState(draft: StateDraft!): StateupdateState(version: Long!, actions: [StateUpdateAction!]!,"Queries with specified ID"id: String,"Queries with specified key"key: String): StatedeleteState(version: Long!,"Queries with specified ID"id: String,"Queries with specified key"key: String): State}input StateDraft {key: String!type: StateType!name: [LocalizedStringItemInputType!]description: [LocalizedStringItemInputType!]initial: Booleanroles: [StateRole!]transitions: [ReferenceInput!]}input StateUpdateAction {addRoles: AddStateRoleschangeInitial: ChangeStateInitialchangeKey: ChangeStateKeychangeType: ChangeStateTyperemoveRoles: RemoveStateRolessetDescription: SetStateDescriptionsetName: SetStateNamesetRoles: SetStateRolessetTransitions: SetStateTransitions}input AddStateRoles {roles: [StateRole!]!}input ChangeStateInitial {initial: Boolean!}input ChangeStateKey {key: String!}input ChangeStateType {type: StateType!}input SetStateDescription {description: [LocalizedStringItemInputType!]}input SetStateName {name: [LocalizedStringItemInputType!]}input SetStateRoles {roles: [StateRole!]!}input SetStateTransitions {transitions: [ResourceIdentifierInput!]}input RemoveStateRoles {roles: [StateRole!]!}