Hey there,
I want to use dataloaders in my code but getting compilation error:
(CompileError) undefined function dataloader/1 (expected SatoriWeb.Schema.Schema to define such a function or for it to be imported, but none are available)
However I’ve initialized everything in my code:
Schema.ex:
import Absinthe.Resolution.Helpers, only: [dataloader: 1, dataloader: 3]
//getting error on this line
field :wallet, list_of(:wallet), resolve: dataloader(Wallet)
Absinthe compiled deps:
{:absinthe, "~> 1.7"},
{:absinthe_phoenix, "~> 2.0"},
{:absinthe_plug, "~> 1.5"},
Found a solution over here: Dataloader compilation error
Here solution is to have updated version but mine is 1.7