Ash.Registry (ash v1.50.6) View Source

A registry allows you to separate your resources from your api module, to reduce improve compile times and reduce compile time dependencies.

For example:

defmodule MyApp.MyRegistry do
  use Ash.Registry,
    extensions: [Ash.Registry.ResourceValidations]
    # This extension adds some simple validations, for example that
    # all related resources are also present in this registry.

  entries do
    entry MyApp.Resource
    entry MyApp.OtherResource
  end
end

Link to this section Summary

Link to this section Types

Link to this section Functions

Link to this function

api_or_api_and_registry(api)

View Source

Specs

api_or_api_and_registry(Ash.Api.t() | {Ash.Api.t(), t()}) :: {t(), t()}

Specs

entries(t()) :: [module()]
Link to this function

handle_before_compile(opts)

View Source