【发布时间】:2018-02-10 07:28:51
【问题描述】:
{
members {
id
lastName
}
}
当我尝试从成员表中获取数据时,我可以得到以下响应。
{ "data": {
"members": [
{
"id": "TWVtYmVyOjE=",
"lastName": "temp"
},
{
"id": "TWVtYmVyOjI=",
"lastName": "temp2"
}
] } }
但是,当我尝试使用 'id' where 子句更新行时,控制台显示错误。
mutation {
updateMembers(
input: {
values: {
email: "testing@test.com"
},
where: {
id: 3
}
}
) {
affectedCount
clientMutationId
}
}
"message": "'where 子句'中的未知列 'NaN'",
上面的一些结果让我很困惑。
- 为什么返回的id不是数值?从数据库中,它是一个数字。
- 当我更新记录时,我可以在 where 子句中使用数字 id 值吗?
我正在使用 nodejs,apollo-client 和 graphql-sequelize-crud
【问题讨论】:
标签: node.js sequelize.js graphql apollo