I am using absinthe in the project, and I am not that well-versed with Graphql. Recently, I am getting this error in the playground and schema is not generating.
Request: POST //graphql/graphiql
** (exit) an exception was raised:
** (UndefinedFunctionError) function nil.name/0 is undefined
nil.name()
(absinthe 1.6.7) lib/absinthe/type/built_ins/introspection.ex:349: Absinthe.Type.BuiltIns.Introspection.render_default_value/4
(elixir 1.10.4) lib/enum.ex:1396: Enum."-map/2-lists^map/1-0-"/2
(elixir 1.10.4) lib/enum.ex:1396: Enum."-map/2-lists^map/1-0-"/2
(absinthe 1.6.7) lib/absinthe/type/built_ins/introspection.ex:333: Absinthe.Type.BuiltIns.Introspection.render_default_value/4
If I run mix absinthe.schema.json --schema SupertrendsWeb.GraphQL.Schema, it gives the same thing and there isn’t much in the error to debug.
Could anyone please suggest how to debug this issue? @benwilson512
Thanks!
Hi @benwilson512 , thank you for your reply, yes , there are couple of enums I have been using in the code, but to exactly figure out which one was wrong was time taking, so I put inspect statements in the introspection.ex file, and figure out the exact enums I need to change, there are a couple of them, and it’s working fine now