AbsintheProjector.Introspection.Association (AbsintheProjector v0.1.0)

Copy Markdown View Source

Metadata for a single Ecto association discovered via reflection.

Produced by AbsintheProjector.Introspection and consumed by the projection engine. Each entry carries only what recursion needs: the association name, its kind, and the related schema module to continue into.

For :through associations, related is resolved to the concrete schema at the end of the through-chain, so it is always directly preloadable.

Summary

Types

The association kind, as classified from Ecto reflection structs.

t()

Types

kind()

@type kind() :: :belongs_to | :has_one | :has_many | :many_to_many | :through

The association kind, as classified from Ecto reflection structs.

t()

@type t() :: %AbsintheProjector.Introspection.Association{
  kind: kind(),
  name: atom(),
  related: module()
}