# `AshGrant.Transformers.AddArgumentResolvers`
[🔗](https://github.com/jhlee111/ash_grant/blob/v0.14.1/lib/ash_grant/transformers/add_argument_resolvers.ex#L1)

Spark DSL transformer that wires up `resolve_argument` declarations.

For every `resolve_argument :name, from_path: [...]` declaration:

  1. Validates the path at compile time (intermediates are belongs_to, leaf
     is an attribute).
  2. Validates that at least one scope references `^arg(:name)` in its
     resolved filter (rejecting dead declarations).
  3. For every targeted write action (`:create`, `:update`, `:destroy`, or
     the explicit `:for_actions` list), injects:
      * an `argument :name, <type>, allow_nil?: true` with the type inferred
        from the leaf attribute (if the action does not already declare it)
      * a `change {AshGrant.Changes.ResolveArgument, [name:, path:,
        scopes_needing:]}` with `scopes_needing` computed at compile time

# `after_compile?`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
