【发布时间】:2018-06-30 01:01:57
【问题描述】:
例如,我想在以下 Absinthe 架构中调用前端的 inserted_on 时间戳 created_at:
defmodule MyAppWeb.Schema.AccountTypes do
use Absinthe.Schema.Notation
object :user do
field :id, :id
field :email, :string
field :inserted_on, :datetime
end
end
但我不确定如何设置 Ecto Absinthe 映射。我应该在我的 Ecto 架构中添加一个虚拟字段吗?
【问题讨论】: