Mutation
mutation CreateWorkflow($input: CreateWorkflowInput!) {
createWorkflow(input: $input) {
workflow {
id
name
trigger
startStepId
steps {
id
workflowId
type
name
payload
transitions
}
publishedAt {
unixTimestamp
iso8601
}
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"name": "string",
"trigger": "string"
}
}Response
{
"data": {
"createWorkflow": {
"workflow": {
"id": "id",
"name": "string",
"trigger": "string",
"startStepId": "id",
"steps": [
{
"id": "id",
"workflowId": "id",
"type": "CONDITION",
"name": "string",
"payload": "string",
"transitions": [
"id"
]
}
],
"publishedAt": {
"unixTimestamp": "string",
"iso8601": "string"
}
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
createWorkflow
Create a new workflow. The workflow starts unpublished with no steps; use bulkUpsertWorkflowSteps to add steps and updateWorkflow to publish it.
The trigger field must be a valid JSON-encoded trigger configuration.
MUTATION
createWorkflow(input: CreateWorkflowInput!): CreateWorkflowOutput!Arguments
input
required
Returns
workflow
error
Mutation
mutation CreateWorkflow($input: CreateWorkflowInput!) {
createWorkflow(input: $input) {
workflow {
id
name
trigger
startStepId
steps {
id
workflowId
type
name
payload
transitions
}
publishedAt {
unixTimestamp
iso8601
}
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"name": "string",
"trigger": "string"
}
}Response
{
"data": {
"createWorkflow": {
"workflow": {
"id": "id",
"name": "string",
"trigger": "string",
"startStepId": "id",
"steps": [
{
"id": "id",
"workflowId": "id",
"type": "CONDITION",
"name": "string",
"payload": "string",
"transitions": [
"id"
]
}
],
"publishedAt": {
"unixTimestamp": "string",
"iso8601": "string"
}
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

