在 Phoenix 中获取 Absinthe.Blueprint.TypeReference.unwrap 错误?

问题描述

我是 Elixir 和 Phoenix-Framework 的新手,所以我试图制作一个简单的 GraphQL 后端,我们可以在其中添加照片并检索它们,但是每当我启动我的服务器时,我都会收到这个奇怪的错误

enter image description here

这是我的 schema.ex 文件:-

defmodule ServerWeb.Schema do
  use Absinthe.Schema
 alias ServerWeb.Resolvers

 import_types __MODULE__.PostsTypes

 query do
  field :photos,list_of(:photo) do
    resolve &Resolvers.Posts.photos/3
  end

end
end

这是我正在使用的解析器

defmodule ServerWeb.Resolvers.Posts do
  alias Server.Posts

  def photos(_,_,_) do
    {:ok,Posts.list_photos}
  end
end

这是我的 PostTypes.ex 文件

defmodule ServerWeb.Schema.PostsTypes do
  use Absinthe.Schema.Notation

  object :photo do
    field :id,non_null(:string)
    field :image_url,non_null(:string)
    field :caption,:string
    field :inserted_at,non null(:string)
    field :updated_at,non_null(:string)
  end

end

谁能帮我解决这个错误?只是为了更多的上下文,这些是我的依赖:-

defp deps do
    [
      {:phoenix,"~> 1.5.8"},{:phoenix_ecto,"~> 4.1"},{:ecto_sql,"~> 3.4"},{:ecto,"~> 3.6"},{:postgrex,">= 0.0.0"},{:phoenix_live_dashboard,"~> 0.4"},{:telemetry_metrics,{:telemetry_poller,{:gettext,"~> 0.11"},{:jason,"~> 1.0"},{:plug_cowboy,"~> 2.0"},{:absinthe,"~> 1.6"},{:absinthe_plug,"~> 1.5"},{:DataLoader,"~> 1.0.0"}
    ]
  end

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...