Mutation
mutation BulkUpsertWorkflowSteps($input: BulkUpsertWorkflowStepsInput!) {
bulkUpsertWorkflowSteps(input: $input) {
results {
workflowStep {
id
workflowId
type
name
payload
transitions
}
result
}
deletedStepIds
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": {
"workflowId": "id",
"steps": [
{
"type": "CONDITION",
"payload": "string",
"transitions": [
"id"
]
}
]
}
}Response
{
"data": {
"bulkUpsertWorkflowSteps": {
"results": [
{
"workflowStep": {
"id": "id",
"workflowId": "id",
"type": "CONDITION",
"name": "string",
"payload": "string",
"transitions": [
"id"
]
},
"result": "CREATED"
}
],
"deletedStepIds": [
"id"
],
"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
bulkUpsertWorkflowSteps
Atomically replace all steps in a workflow. Steps with a matching stepId are updated; steps without an ID (or with a new ID) are created; steps that existed before but are absent from the input are deleted.
Optionally updates startStepId and the trigger configuration in the same call. Maximum 60 steps per workflow.
MUTATION
bulkUpsertWorkflowSteps(input: BulkUpsertWorkflowStepsInput!): BulkUpsertWorkflowStepsOutput!Arguments
input
required
Returns
results
Results for each step in the input (same order as input).
deletedStepIds
[ID!]!
IDs of steps that were deleted (existed before but not in input).
workflow
Updated workflow after operation.
error
Mutation
mutation BulkUpsertWorkflowSteps($input: BulkUpsertWorkflowStepsInput!) {
bulkUpsertWorkflowSteps(input: $input) {
results {
workflowStep {
id
workflowId
type
name
payload
transitions
}
result
}
deletedStepIds
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": {
"workflowId": "id",
"steps": [
{
"type": "CONDITION",
"payload": "string",
"transitions": [
"id"
]
}
]
}
}Response
{
"data": {
"bulkUpsertWorkflowSteps": {
"results": [
{
"workflowStep": {
"id": "id",
"workflowId": "id",
"type": "CONDITION",
"name": "string",
"payload": "string",
"transitions": [
"id"
]
},
"result": "CREATED"
}
],
"deletedStepIds": [
"id"
],
"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?

