【发布时间】:2019-07-26 16:59:18
【问题描述】:
我需要查询所有未完成的项目,其中完成后项目将获得状态更改 (Completed) 以及布尔值 isComplete==true。
我正在通过 AWS Appsync 测试查询,然后再将它们硬编码到我的应用程序中,但这似乎并不有效。我想要isComplete==false 或isComplete==null 的所有项目:布尔逻辑不适用于下面的input1 变量(0 个结果)。
{"__typename":{"S":"Project"},"addressLine1":{"S":"321 Faith Cir"},"city":{"S":"Perris"},"createdAt":{"S":"2019-03-05T01:01:39.513Z"},"currentOwner":{"S":"pgres52"},"dateRequired":{"S":"2019-03-13-07:00"},"id":{"S":"89a5-42ef7efef8fb"},"status":{"S":"Created"},"statusLastChangedAt":{"S":"2019-03-05T01:01:39.513Z"}}
{
"input1":{
"isComplete": {
"ne": true
}
}
}
query listNonCompleteProjects($input1: ModelProjectFilterInput) {
listProjects(filter: $input1, limit: 20) {
items {
id
currentOwner
addressLine1
city
dateRequired
isComplete
statusLastChangedAt
}
nextToken
}
}```
【问题讨论】:
-
您是在使用 AWS Amplify 代码生成还是您自己编写解析器?
-
嗨 @Aaron_H,我使用了 Amplify 代码生成
标签: amazon-web-services amazon-dynamodb graphql aws-appsync