Jack Sundberg
11/06/2021, 4:15 PMnruns = FlowRuns.objects.filter(flow__name="MyExampleFlow", state__in=["Running", "Submitted"]).count()
But for graphql... I'm kinda lost. And how would I format this in python for the client.query()
method?Kevin Kho
Jack Sundberg
11/06/2021, 4:19 PMJack Sundberg
11/06/2021, 4:26 PMquery FlowRuns($flow_run_name: "MyExampleFlow",) {
Success: flow_run_aggregate(
where: {
flow: { name: { _eq: $flow_run_name }}
state: { _eq: "Success" }
}
) {
aggregate {
count
}
}
Jack Sundberg
11/06/2021, 4:26 PMJack Sundberg
11/06/2021, 4:33 PMquery {
flow_run_aggregate (where:
{flow: {name:{_eq: "MyExampleFlow"}}
state: { _in: ["Success", "Pending"] }
})
{
aggregate {count}
}
}
Kevin Kho