Hi, I am trying to use dataloader
in Absinthe, but am getting this error message on compile:
== Compilation error in file lib/book_list_web/schema.ex ==
** (CompileError) lib/book_list_web/schema.ex:8: cannot import Absinthe.Resolution.Helpers.dataloader/1 because it is undefined or private
Here is where the error occurs:
defmodule BookListWeb.Schema do
use Absinthe.Schema
use Absinthe.Ecto, repo: BookList.Repo
alias BookList.BookSpace.Book
import Absinthe.Resolution.Helpers, only: [dataloader: 1] . ### ERROR HERE
import_types Absinthe.Type.Custom
Here are the related lines in mix.exs
:
{:plug_cowboy, "~> 1.0"},
{:absinthe_ecto, "~> 0.1.0"},
{:absinthe_plug, "~> 1.3.0"},
{:dataloader, "~> 1.0.0"},