Search documentation of ash

# View Source Ash.Resource.ManualRead behaviour (ash v3.4.30)

A module to implement manual read actions.

# Summary

## Types

context()

## Callbacks

load_relationships(query, results, opts, context, lazy?)
read(query, data_layer_query, opts, context)

# Types

Link to this type

# context()

View Source

    @type context() :: %{
      optional(:actor) => term(),
      optional(:tenant) => term(),
      optional(:authorize?) => boolean(),
      optional(:domain) => module(),
      optional(any()) => any()
    }

# Callbacks

Link to this callback

# load_relationships(query, results, opts, context, lazy?)

View Source (optional)

    @callback load_relationships(
      query :: Ash.Query.t(),
      results :: [Ash.Resource.record()],
      opts :: Keyword.t(),
      context :: context(),
      lazy? :: boolean()
    ) :: {:ok, [Ash.Resource.record()]} | {:error, term()}

Link to this callback

# read(query, data_layer_query, opts, context)

View Source

    @callback read(
      query :: Ash.Query.t(),
      data_layer_query :: term(),
      opts :: Keyword.t(),
      context :: context()
    ) :: {:ok, [Ash.Resource.record()]} | {:error, term()}