Skip to content

Commit

Permalink
Use :repo instead of ElixirBoilerplate.Repo as dataloader default sou…
Browse files Browse the repository at this point in the history
…rce key (#313)
  • Loading branch information
garno committed May 25, 2023
1 parent 97c801f commit 27ca3f9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/elixir_boilerplate_graphql/schema.ex
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
defmodule ElixirBoilerplateGraphQL.Schema do
use Absinthe.Schema

alias ElixirBoilerplate.Repo

import_types(Absinthe.Type.Custom)
import_types(ElixirBoilerplateGraphQL.Application.Types)

Expand All @@ -18,7 +16,7 @@ defmodule ElixirBoilerplateGraphQL.Schema do
# end

def context(context) do
Map.put(context, :loader, Dataloader.add_source(Dataloader.new(), Repo, Dataloader.Ecto.new(Repo)))
Map.put(context, :loader, Dataloader.add_source(Dataloader.new(), :repo, Dataloader.Ecto.new(ElixirBoilerplate.Repo)))
end

def plugins do
Expand Down

0 comments on commit 27ca3f9

Please sign in to comment.