https://prefect.io logo
Title
c

Chandra Manginipalli

09/15/2020, 6:37 PM
Anyone know how to pass GraphQL variables in Interactive API. I tried the following with no luck for state. Syntax Error: Expected Name, found \"{\
mutation($state: JSON!) {
set_flow_run_state(input: {flow_run_id: "83b4e6be-b1ac-416c-833c-236c23f5e1ca", version: 5, state: $state}) {
id
}
}
{
state: {
type: "Success"
message: "It worked!"
}
}
👀 1
j

Jenny

09/15/2020, 7:06 PM
Hi @Chandra Manginipalli Here's an example of how the set_flow_run_states mutation should look:
mutation {
  set_flow_run_states(input: {states : [{flow_run_id: "xxxxxxxx", version: 2, state: "{\"type\": \"Failed\"}"
  }]}) {
    states {
   id
    }
  }
}
👍 1
c

Chandra Manginipalli

09/15/2020, 7:29 PM
Thats awesome. Thank you.