小编Bit*_*nny的帖子

AWS amplify graphql appsync - 不返回已删除的项目?

我将 AWS amplify 与 graphql 和 appsync 结合使用。当我执行标准列表查询时,appsync 在它返回的项目列表中包含已删除的项目。

我该怎么做才能让它只返回未删除的项目?

我尝试了这个查询,但它抛出一个错误:

query MyQuery($filter: ModelFrameFilterInput = {_deleted: {ne: true}}) {
  listFrames(filter: $filter) {
    items {
      _deleted
      name
      id
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

这是错误消息:

 "message": "Validation error of type BadValueForDefaultArg: Bad default value ObjectValue{objectFields=[ObjectField{name='_deleted', value=ObjectValue{objectFields=[ObjectField{name='ne', value=BooleanValue{value=true}}]}}]} for type ModelFrameFilterInput"
Run Code Online (Sandbox Code Playgroud)

amazon-web-services graphql aws-appsync aws-amplify

9
推荐指数
1
解决办法
2423
查看次数