【发布时间】:2019-12-10 03:21:47
【问题描述】:
我是 Appsync 的新手并坚持以下内容
type User{
id: ID
name : String
address: String
}
type Car{
id: ID
model: String
make: String
}
type Query {
getusers: [User]
getcars: [Car]
}
这很好用,因为 getusers 和 getcars 将两个不同的 HTTP 端点设置为数据源。
我要做的是创建另一种类型 AllDetail 并查询 getdetails(期望返回所有用户的列表,然后是所有汽车的列表)
type AllDetail{
users : [User]
cars : [Car]
}
type Query {
getusers: [User]
getcars: [Car]
getdetails : AllDetail
}
我需要帮助 1)设置getdetails的数据源(因为涉及到两个端点) 2) 有没有其他方法可以让 getdetails 返回所有用户的列表,然后是所有汽车的列表。
【问题讨论】:
标签: graphql aws-appsync