== Compilation error on file web/schema.ex ==
** (UndefinedFunctionError) function App.Schema.Types.__absinthe_types__/0 is undefined (module App.Schema.Types is not available)
App.Schema.Types.__absinthe_types__()
Absinthe.Schema.Notation.do_import_types/2
expanding macro: Absinthe.Schema.Notation.import_types/1
web/schema.ex:6: App.Schema (module)
(elixir) lib/kernel/parallel_compiler.ex:116: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/1
Am getting this error when trying to compile or launch a phoenix app with absinthe and absinthe-plug.
Believe I have followed documentation exactly...
using Elixir 1.3.2 on Debian 8
{:absinthe, "~> 1.1.0", {:absinthe_plug, "~> 1.1"} as deps to the phoenix project.
defmodule App.Schema.Types do
use Absinthe.Schema.Notation
@desc "An artifact"
object :artifact do
field :id, :id
field :title, :string
field :body, :string
field :author, :string
field :source, :artifact_source
end
@desc "The source of an artifact"
enum :artifact_source do
value :reddit, description: "A Reddit Post"
value :twitter, description: "A Tweet"
value :facebook, description: "A Facebook Post or Comment"
value :wikipedia, description: "A Wikipedia Article"
value :youtube, description: "A YouTube Video or Comment"
value :instagram, description: "An Instragram Post"
end
end
defmodule App.Schema do
use Absinthe.Schema
alias App.Resolver
import_types App.Schema.Types
query do
field :artifacts, list_of(:artifact) do
arg :search, non_null(:string)
resolve &Resolver.Artifact.search/2
end
end
end
Any help is much appreciated!
bahh i figured it out...
files were not in the web directory of the phoenix app it turns out..
Whoops, closing.
Most helpful comment
bahh i figured it out...
files were not in the web directory of the phoenix app it turns out..
Whoops, closing.