Workflow.add_graft to support grafting lists similar to add_cascase

In the type signature of add_graft it says

@spec add_graft(t(), name(), Oban.Job.changeset() | cascade_capture(), add_opts()) ::
  t()

where casecade_capture is defined as

@type cascade_capture() :: (map() -> any()) | {Enum.t(), (any(), map() -> any())}

That is, according to the type add_graft supports fanning out like

workflow |> Workflow.add_graft(:create_things, {things, &create_things})

But it looks like that’s actually not what’s implemented. Only the first part of cascade_capture is implemented, not the outlined one.

1 Like

Good catch @alexbiehl, thanks! This is fixed (implemented) for the upcoming v1.6.11 :slightly_smiling_face:

1 Like