Anyone know how to pass GraphQL variables in Inter...
# prefect-community
c
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
Hi @Chandra Manginipalli Here's an example of how the set_flow_run_states mutation should look:
Copy code
mutation {
  set_flow_run_states(input: {states : [{flow_run_id: "xxxxxxxx", version: 2, state: "{\"type\": \"Failed\"}"
  }]}) {
    states {
   id
    }
  }
}
👍 1
c
Thats awesome. Thank you.