server
server copied to clipboard
Create a set_flow_schedule graphql mutation
Current behavior
Currently, there are no graphql mutations to provide creating a schedule for a given flow at run time (after the flow has been created). Instead, we need to either
- use the graphql
update_flow
end point - use the graphql
set_flow_group_schedule
Proposed behavior
Introduce a set_flow_schedule
into the graphql mutation into the graphql endpoint.
Example
This enhancement would be very useful so that we can save the schedules all in the flow information and it is more convenient.
Hi @anthonyfong100 - this is precisely what set_flow_group_schedule
is for; is there a reason that route doesn't work for your use case? We don't want to introduce a way of altering the ground-truth of the Flow configuration that was registered (that way we can always revert back to user's code configuration if needed), hence the introduction of Flow Groups.
hi @cicdw I understand where you are coming from. However, i feel like setting it on the flow group might not be as suitable as storing all the schedules on the flow:
- It is not as intuitive to set on flow group and not on flow and might be error prone when just starting out (Listing a flow schedule required one to check both flow and flow group schedule)
Is it possible to instead store and additional flag in the schedule object like for e.g. base_schedule: true
. This allows all the schedule information to be stored at the same place making it less error prone
The issue you describe sounds like an issue of documentation - we should make sure users understand how Flows and Flow Groups interact, along with the implications for database queries, but I don't see a benefit to adding a third way of altering a Flow's schedule that has its own unique failure modes (e.g., schedule changes won't persist across re-registrations).