amazon-web-services - GraphQL:无法写入增量同步记录
问题描述
我的 Amplify 应用程序上有此架构:
type QnAQuestion @model {
id: ID!
questionTitle: String
questionDescription: String
questionViews: Int
askedBy: String
askedAt: String
QnaComments: [QnaComment] @connection(keyName: "byQnAQuestion", fields: ["id"])
}
type QnaComment @model @key(name: "byQnAQuestion", fields: ) {
id: ID!
comment: String
commenter: String
commentedAt: String
qnaquestionID: ID
}
我想使用此查询添加数据:
mutation MyQuery {
createQnAQuestion(input: {askedAt: "Test", askedBy: "Test"}) {
id
}
}
但是,我得到:
{
"data": {
"createQnAQuestion": null
},
"errors": [
{
"path": [
"createQnAQuestion"
],
"data": {
"id": "xasz"
},
"errorType": "DeltaSyncWriteError",
"errorInfo": null,
"locations": [
{
"line": 2,
"column": 3,
"sourceName": null
}
],
"message": "Failed to write delta sync record."
}
]
}
我的 iOS 应用程序上也存在此错误,虽然.. 记录已创建但返回此错误。
DeltaSyncWriteError
无法写入增量同步记录。
示例:突变成功,但尝试写入增量同步表时发生内部错误。
解决方案
推荐阅读
- vue.js - 如何在 Vuex-ORM 中创建具有默认值的新实体
- python - Django 模板不存在:不同机器中的相同代码和软件
- javascript - Django 不保护 BooleanFields 的值
- r - fread() 与 read.csv() 的索引问题?
- r - 如何从数据中完全删除重复行?
- python - Python:如何解决“请求的 URL 被拒绝。请咨询您的管理员。”
- c++ - 将 CComboBox 添加到 CMFCStatusBar 窗格的问题
- linq-to-sql - Linq 加入与 .Where().DefaultIfEmpty()
- swift - 简单的 SwiftUI Arc endAngle 动画不起作用,只能从一种状态跳转到另一种状态
- regex - notepad++正则表达式如何查找和替换