AshIntrospection.Rpc.Request (AshIntrospection v0.4.0)

Copy Markdown View Source

Request data structure for the RPC pipeline.

Contains all parsed and validated request data needed for Ash execution. Immutable structure that flows through the pipeline stages.

This is a shared module used by both AshTypescript and AshKotlinMultiplatform.

Summary

Functions

Creates a new Request with validated parameters.

Types

t()

@type t() :: %AshIntrospection.Rpc.Request{
  action: map(),
  actor: term(),
  context: map(),
  domain: module(),
  extraction_template: map(),
  filter: map() | nil,
  get_by: map() | nil,
  identity: term(),
  input: map(),
  load: list(),
  pagination: map() | nil,
  resource: module(),
  rpc_action: map(),
  select: [atom()],
  show_metadata: [atom()],
  sort: list() | nil,
  tenant: term()
}

Functions

new(params)

@spec new(map()) :: t()

Creates a new Request with validated parameters.

Examples

iex> AshIntrospection.Rpc.Request.new(%{domain: MyApp.Domain, resource: MyApp.Todo})
%AshIntrospection.Rpc.Request{domain: MyApp.Domain, resource: MyApp.Todo, ...}