Hi Prefecters, does anyone know the command to del...
# ask-community
v
Hi Prefecters, does anyone know the command to delete a flow? Or can it be done only using the UI?
a
You can delete a flow from the UI or using the corresponding GraphQL mutation. Check the Interactive API page to see the available mutations
v
Is it possible for you to provide me with a link?
v
Do you have a sample mutation GQL of deleting a flow? @ale
a
Copy code
mutation {
  delete_flow(input: {flow_id: "<your flow ID>"}) {
    success,
    error
  }
}
🙌 1
v
Awesome man!! Thank you so much!
👍 1
j
“Prefecters” I like it
🙌 1
v
@ale, there's no way we can do this for multiple flow ids right?
a
Nope
z
(not in a single query, you can query for flow ids then loop over them)
Generally we don't allow deleting multiple objects in a single mutation because it is harder to manage failures i.e. what if the API errors in the middle of the list you've sent
v
Okay, where would I get the resources to master GQL for prefect? I'm very new to this
z
There's also an interactive graphql API in the UI so you can test things out
v
Thanks @ale and @Zanie!
a
You’re welcome @Varun Joshi simple smile
🙌 1