Clean compilation as on elixir 1.6
== Compilation error in file lib/my_app_web/schema.ex ==
** (Absinthe.Schema.Error) Invalid schema:
Elixir.MyApp.Web.Schema:0: The root query type must be implemented and be a of type Object
#Example
defmodule MyApp.Schema do
use Absinthe.Schema
query do
#Fields go here
end
end
--------------------------------------
From the graqhql schema specifiation
A GraphQL schema includes types, indicating where query and mutation
operations start. This provides the initial entry points into the type system.
The query type must always be provided, and is an Object base type. The
mutation type is optional; if it is null, that means the system does not
support mutations. If it is provided, it must be an object base type.
Reference: https://facebook.github.io/graphql/#sec-Initial-types
lib/absinthe/schema.ex:271: Absinthe.Schema.__after_compile__/2
(stdlib) lists.erl:1263: :lists.foldl/3
(stdlib) erl_eval.erl:677: :erl_eval.do_apply/6
Hey @lukaszsamson as a general rule we wait for at least a beta or RC release of a language version before accepting issues about it. The pace of change can be high during its development period and chasing that isn't a good use of time. If you believe there's an absinthe error and you want to try to do a PR we can look at that.
Well we've got an RC now and the issue persists. Investigating.
@benwilson512 I've pulled down your changes locally and am testing things out and this issue does not seem to be present in what is in master. 馃帄 馃憤 I think you can close this issue?
This is still happening with 1.7.1 which is the latest stable version of Elixir.
@phikes run mix deps|grep absinthe. If you aren't on the latest version, upgrade.
Of course, my bad! Thank you very much and sorry for the inconvenience!
Most helpful comment
Well we've got an RC now and the issue persists. Investigating.