Graphql 如何使用AWS Amplify搜索@连接
因此,我的模式中有3个集合Graphql 如何使用AWS Amplify搜索@连接,graphql,schema,aws-amplify,Graphql,Schema,Aws Amplify,因此,我的模式中有3个集合 type User @model(subscriptions: null) { id: ID! name: String email: String events: [EventUser] @connection(keyName: "byUser", fields: ["id"]) } 我正试图通过eventID和user.name搜索EventUser集合。是否有一些放大功能可以让我通过user.name搜
type User @model(subscriptions: null) {
id: ID!
name: String
email: String
events: [EventUser] @connection(keyName: "byUser", fields: ["id"])
}
我正试图通过eventID
和user.name
搜索EventUser
集合。是否有一些放大功能可以让我通过user.name
搜索并返回EventUser
集合
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"])
}