View Source Smokestack.RelatedBuilder (smokestack v0.9.1)

Recursively build the factory and any related factories that have been requested.

Summary

Types

A nested keyword list of associations that should also be built.

A nested keyword list of previously built records to explicitly associate to the new record.

Functions

Build related factories, if required.

Types

@type build_option() :: {:build, Smokestack.recursive_atom_list()}

A nested keyword list of associations that should also be built.

@type relate_option() :: {:relate, [{atom(), Ash.Resource.record()}]}

A nested keyword list of previously built records to explicitly associate to the new record.

@type result() :: %{optional(atom()) => any()}

Functions

@spec build(Smokestack.Dsl.Factory.t(), [option()]) ::
  {:ok, result()} | {:error, error()}

Build related factories, if required.