我有这个graphQL模式来定义我的Amplify API:
type Address @model @searchable {
id: ID!
address: String!
latitude: Float!
longitude: Float!
}
type Dog @model @searchable {
id: ID!
address: Address!
name: String!
}
当我尝试用产生的突变创建一只狗
mutation CreateDog($input: CreateDogInput!) {
CreateDogPoint(input: $input) {
id
address {
id
address
latitude
longitude
}
name
}
}
我在AppSync上将以下对象作为参数来测试对象的创建:
{ "input" : { "address": { "address" : "WoofieLand", "latitude": 11, "longitude": 20 }, "name": "Rex" } }
但是,它表示地址字段不存在。如何运作,我不明白?
非常感谢您阅读。