Packages

Generate type-safe Gleam clients directly from your Ash resources and actions, ensuring end-to-end type safety between Gleam and Elixir.

Current section

Files

Jump to
ash_gleam doc AshGleam.DomainExtension.md
Raw

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*