Behaviour for pipeline hooks.
Hook modules can be registered in config:
config :ash_dyan, :hooks, %{
before_query: [MyApp.Hooks.BeforeQuery],
after_query: [MyApp.Hooks.AfterQuery],
before_format: [MyApp.Hooks.BeforeFormat],
after_format: [MyApp.Hooks.AfterFormat]
}Each hook receives the accumulator, request, and options, and returns the modified accumulator.
Summary
Callbacks
@callback after_format(AshDyan.Result.t(), AshDyan.Request.t(), keyword()) :: AshDyan.Result.t()
@callback after_query([Ash.Resource.Record.t()], AshDyan.Request.t(), keyword()) :: [ Ash.Resource.Record.t() ]
@callback before_format([Ash.Resource.Record.t()], AshDyan.Request.t(), keyword()) :: [ Ash.Resource.Record.t() ]
@callback before_query(Ash.Query.t(), AshDyan.Request.t(), keyword()) :: Ash.Query.t()