AshGrant.Dsl.ResolveArgument (AshGrant v0.14.1)

Copy Markdown View Source

Represents a resolve_argument declaration in the AshGrant DSL.

Declares that an action argument should be auto-populated from the resource's own relationships so that argument-based scopes (e.g., ^arg(:center_id)) evaluate correctly without the scope itself having to traverse relationships.

Fields

  • :name — the argument name
  • :from_path — list of atoms walking relationships to the leaf attribute (intermediates must be belongs_to, leaf must be an attribute)
  • :for_actions — optional list of action names; defaults to all write actions

Summary

Types

t()

@type t() :: %AshGrant.Dsl.ResolveArgument{
  __spark_metadata__: map() | nil,
  for_actions: [atom()] | nil,
  from_path: [atom()],
  name: atom()
}