Current section
Files
Jump to
Current section
Files
doc/AshGleam.DomainExtension.md
# `AshGleam.DomainExtension`
Domain extension that generates code-interface functions for Gleam update actions.
## Usage
defmodule MyApp.MyDomain do
use Ash.Domain,
otp_app: :my_app,
extensions: [AshGleam.DomainExtension]
gleam_updates do
resource MyApp.Todo do
define_gleam_update :mark_completed, action: :update
end
end
end
This generates `mark_completed/1-3` and `mark_completed!/1-3` on the domain module.
# `gleam_updates`
*macro*
---
*Consult [api-reference.md](api-reference.md) for complete listing*