如何使用AWS Amplify搜索{connection}

问题描述

所以我的架构中有3个集合

type User @model(subscriptions: null)  {
  id: ID!
  name: String
  email: String
  events: [EventUser] @connection(keyName: "byUser",fields: ["id"])
}
type Event @model
  @key(name: "byApiKey",fields: ["apiKey"])
  @key(name: "byOrganization",fields: ["organizationID"],queryField: "eventByOrganization")
  {
  id: ID!
  apiKey: ID!
  title: String
  participants: [EventUser] @connection(keyName: "byEvent",fields: ["id"])
}

type EventUser @model
  @key(name: "byUser",fields: ["userID"],queryField: "eventByUser")
  @key(name: "byEvent",fields: ["eventID"],queryField: "userByEvent")    {
  id: ID!
  userID: ID!
  eventID: ID!
  user: User! @connection(fields: ["userID"])
  event: Event! @connection(fields: ["eventID"])
}

我正在尝试按EventUsereventID搜索user.name集合。是否有一些放大功能可以使我按user.name进行搜索并返回EventUser集合?

解决方法

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

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

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