MishkaGervaz.Form.Entities.Field.Preload (MishkaGervaz v0.0.1-alpha.2)

Copy Markdown View Source

Three-tier preload configuration for a relation Field.

Supports separate preload lists for all users (always), master users (master), and tenant users (tenant), allowing fine-grained control over which relationships are eagerly loaded based on the current user's access level. Each list accepts atoms or {source, alias} tuples — the :always list is always read; the :master and :tenant lists are merged in based on state.master_user?.

Mirrors the resource-level MishkaGervaz.Form.Dsl.Source preload block but scoped to a single relation field.

Summary

Types

t()

@type t() :: %MishkaGervaz.Form.Entities.Field.Preload{
  __spark_metadata__: map() | nil,
  always: [atom() | {atom(), atom()}],
  master: [atom() | {atom(), atom()}],
  tenant: [atom() | {atom(), atom()}]
}

Functions

transform(preload)