Hi there, I’m new to prefect and GraphQL. I’m trying to trigger a flow based on the flow_name. Is there a way to chain the following GraphQL queries or do i need to send the requests consecutively ? Thanks
I think if you are using the interactive API, it only runs one at a time so you do need to chain these…but if you are using Python, there is a
StartFlowRun
task and
create_flow_run
task that do these for you here. You can also check the source here to see how it does it. These tasks will be easier than using the graphQL api in python
l
Luca Schneider
09/15/2021, 7:30 PM
Hi thanks for your answer, yes I have been using the interactive api and I understand i could use the python client. But I’m designing this query for my co-workers that will run it with C#/.Net
Luca Schneider
09/15/2021, 7:31 PM
From reading the source code, it seems that it query first the flow id before creating the flow_run
Luca Schneider
09/15/2021, 7:36 PM
Hence I’m looking for an example of such queries chaining :)
k
Kevin Kho
09/15/2021, 7:36 PM
Ah I understand. Yes exactly you’re on the right track 🙂
Kevin Kho
09/15/2021, 7:37 PM
Just make sure you attach the authorization in the header, but you probably figured it out
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.