mirror of
https://github.com/team-alembic/ash_authentication.git
synced 2024-09-20 05:13:10 +12:00
8797005175
* improvement(docs): change all references to `actor` to `user`. The word "actor" has special meaning in the Ash ecosystem. * chore: format `dev` directory also. * feat(Ash.PlugHelpers): Support standard actor configuration. * Adds the `:set_actor` plug which will set the actor to a resource based on the subject name. * Also includes GraphQL and JSON:API interfaces in the devserver for testing.
16 lines
281 B
Elixir
16 lines
281 B
Elixir
defmodule Example.Schema do
|
|
@moduledoc false
|
|
use Absinthe.Schema
|
|
|
|
@apis [Example]
|
|
|
|
use AshGraphql, apis: @apis
|
|
|
|
def context(ctx) do
|
|
AshGraphql.add_context(ctx, @apis)
|
|
end
|
|
|
|
def plugins do
|
|
[Absinthe.Middleware.Dataloader | Absinthe.Plugin.defaults()]
|
|
end
|
|
end
|