Hi Prefect, after using graphql to update the flow...
# prefect-community
e
Hi Prefect, after using graphql to update the flow name:
Copy code
mutation {
  update_flow (_set: {name: "After Modified"}, where: {_and: {project_id: {_eq:"ea8106f2-1642-4e54-955a-3af1d7c7465e"}, name: {_eq: "Ori Flow Name"}} }){
    affected_rows
  }
}
it returned success and affected_rows=5 (5 different versions), but when I click 'start now' to create a new flow-run, it shows that:
Copy code
Last State Message
[9 Dec 2020 9:26am]: Failed to load and execute Flow's environment: KeyError('After Modified')
Is there any step I missed? I just want to modify the flow name after I registered the flow. Thank you🙏
c
Hi Eric! You currently cannot update a Flow’s name through the API without reregistration — certain types of storage rely on the name to load the flow (as you’re seeing). In general, I don’t recommend altering database data directly without going through a dedicated API route, as that will usually have unintended consequences like what you’re seeing here
e
@Chris White Thanks Chris🙏, maybe I need to reregister a new version of flow if I want to modify the flow name, right?
c
Yup that’s accurate 👍
😊 1