ash_authentication/test/support/example/schema.ex
James Harton 8797005175
feat(Ash.PlugHelpers): Support standard actor configuration. (#16)
* 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.
2022-10-31 16:43:00 +13:00

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