View Source Smokestack.RelatedBuilder (smokestack v0.9.2)

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

build_option()

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

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

error()

option()

relate_option()

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

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

result()

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

Functions

build(factory, options)

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

Build related factories, if required.