AWS AppSync Null @连接查询结果

问题描述

我正在使用Amplify创建一个Web应用程序,并且想在两个表之间创建一个关系以保持事物干燥。我有2个表:ListingService。每个清单应与一个服务相关。我的(缩写)模式如下所示。所有查询/解析器均由amplify push

自动生成
type Listing 
@model
@auth(rules: [{ allow: public,operations: [read] }])
{
  id: ID!
  status: Status
  source: String
  service: String
  serviceDetail: Service @connection (keyName: "service")
}

type Service @model {
  id: ID!
  name: String
  homepage: AWSURL
  logo: String
}

为消除任何其他问题,我在AppSync控制台中运行测试。

运行ListServices查询将返回Service表中的所有预期数据,而不会出现任何错误。在特定的getService上运行id查询将返回预期的数据,而不会出现任何错误。

运行ListListings查询将返回没有错误以及Listings表中的所有预期数据。 serviceDetail字段仅包含null

我整个上午都在仔细阅读文档,无法找出问题所在。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)