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.Domain.md
Raw

doc/AshGleam.Domain.md

# `AshGleam.Domain`
Domain extension for Gleam FFI exports and code interface generation.
## Usage
defmodule MyApp.MyDomain do
use Ash.Domain,
otp_app: :my_app,
extensions: [AshGleam.Domain]
gleam do
ffi do
resource MyApp.Todo do
action :list_todos, :read
action :create_todo, :create
end
end
code_interface do
resource MyApp.Todo do
define_gleam_update :mark_completed, action: :update
end
end
end
end
# `gleam`
*macro*
---
*Consult [api-reference.md](api-reference.md) for complete listing*