【问题标题】:AWS AppSync delta table not working correctlyAWS AppSync 增量表无法正常工作
【发布时间】:2020-02-02 23:05:33
【问题描述】:

我正在关注 aws appsync 教程,但我陷入了增量同步步骤 (https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-delta-sync.html)。

我已经完成了示例,但结果与预期不符。在更新步骤中,dynamodb 不会像示例中那样创建 2 条记录(创建项目时的记录和更新项目时的记录)。并且在使用 delta 查询时,会收到一条错误消息:

  "data": null,
  "errors": [
    {
      "path": [
        "syncPosts"
      ],
      "locations": null,
      "message": "Cannot return null for non-nullable type: 'PostConnection' within parent 'Query' (/syncPosts)"
    }
  ]
}

我的详细表 ttl 是 1 分钟,增量查询仅从基表中选择,而不是从增量表中选择。

有人可以调查一下并帮助我吗?谢谢

【问题讨论】:

    标签: amazon-web-services aws-appsync


    【解决方案1】:

    我找到了解决方案,我将增量表 partition_key 字段设置为 ds_pk,并将增量表 sort_key 字段设置为 ds_sk。修改后的结果和预期的一样。

    【讨论】:

      猜你喜欢
      • 2020-03-05
      • 2020-10-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-06-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多