- In the `formatFieldMetadataValue` function, allow people to call TypeORM's `save()` method with unserialized JSON data. - Create an `overrideWorkflowDraftVersion` mutation that takes a workflow id and the id of the workflow version to use as the new draft - If no draft exists yet, create one - If a draft already exists, deactivate its serverless functions - Duplicate every step. For serverless function steps, it includes duplicating the functions - Save the data of the step in DB - Call the `overrideWorkflowDraftVersion` mutation in the old workflow header and in the new Cmd+K actions - I chose to not update the Apollo cache manually as the information of the new draft are going to be automatically fetched once the user lands on the workflow's show page. Note that we redirect the user to this page after overriding the draft version.
Run yarn dev while server running on port 3000