放大 Graphql appsync 数据返回不逻辑的 bug

发布于 2025-01-18 00:12:49 字数 501 浏览 1 评论 0原文

当我创建一个项目时,该项目已经创建了,我可以按ID获取项目,但是当我获得列表时,项目不包含创建的项目。

type Order @model @searchable{
  id: ID! @primaryKey
  ref: String!
  user: User @belongsTo
}

// first query works!!
query MyQuery {
  getOrder(id: "idxamplee") {
    id
    ref
  }
}

//second query not work
query MyQuery {
  listOrders() {
    items {
      id
      ref
    }
  }
}

放大Appsync DynamoDB同步 schemaurl

When I create an item, the item has created and I can get the item by id but when i get the list items doesn't contain the item created.

type Order @model @searchable{
  id: ID! @primaryKey
  ref: String!
  user: User @belongsTo
}

// first query works!!
query MyQuery {
  getOrder(id: "idxamplee") {
    id
    ref
  }
}

//second query not work
query MyQuery {
  listOrders() {
    items {
      id
      ref
    }
  }
}

amplify appsync dynamodb synchronization
schemaUrl

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文