【发布时间】:2017-12-20 18:26:30
【问题描述】:
我正在使用 postgraphql 自动生成的突变在 postgres 表中的 a 中创建带有 graphql 的行,该表具有数据类型 UUID[] 的列。
但是,似乎没有办法用 graphql 保存这个 UUID[] 数据?这是 graphql 没有考虑的数据类型,还是我错误地形成了数组?
当我在 graphiql 中创建行时:
mutation {
createJob(
input: {
user_ids: ["5b7323ac-e235-4edb-bbf9-97495d9a42a1"],
instructions: "Job Instructions",
publishedDate: "2017-06-07"}
}
)
}
我收到以下错误:
"message": "column \"user_ids\" is of type uuid[] but expression is of type text[]"
从技术上讲,UUID 是否不像文本那样存储?我尝试了不同的方法来形成 UUID 数组,但似乎没有任何效果
【问题讨论】:
标签: postgresql uuid graphql postgraphql