HI all, I'm new to prefect, loving it so far. I'm working on a 1.0 project that I've inherited - I was wondering if there is a way to utilize the graphql api to verify that all downstream tasks (including children of children etc) of a particular task run were successful. I can do it via repeated querying for downstream_task info, but it would be nice if there was some other method that didn't involve hitting the api repeatedly. Thanks.
✅ 1
m
Mason Menges
09/14/2022, 6:53 PM
Hey @chris arettines if I'm understanding you correctly I think the easiest way to do this would actually be to query for the flow_run and include the task runs related to it, so something like this which could likely be modified to return the relevant information you might want/need
query {
flow_run {
id
name
task_runs {
details {
id
state
}
}
}
}
c
chris arettines
09/14/2022, 7:02 PM
Hi Mason, thanks for the reply. I will look into that. What I effectively want is to be able to answer the question "has this subflow (defined by a given flow task as the root node and all downstream dependencies) succeeded?"