Ohs*_*sik 2 amazon-web-services graphql aws-appsync aws-amplify
使用 AWS Appsync 开发 React 应用程序并首次尝试 graphQL。我的schema.graphql对我来说是有意义的,但抛出一个错误,我真的不知道如何查看发生了什么。
这是一个用户可以通过通知系统发帖和评论的应用程序。收到Resource is not in the state stackUpdateComplete错误消息amplify push
type User @model {
id: ID!
following: [User]
follower: [User]
post: [Post] @connection(name: "UserPost")
comment: [Comment] @connection(name: "UserComment")
notification: [Notification] @connection(name: "UserNotification")
}
type Post @model {
id: ID!
user: User! @connection(name: "UserPost")
privacy: String!
content: String!
loved: [User]
comment: [Comment] @connection(name: "PostComment")
}
type Comment @model {
id: ID!
user: User! @connection(name: "UserComment")
content: String!
loved: [User]
post: Post @connection(name: "PostComment")
}
type Notification @model {
id: ID!
content: String!
link: String!
category: String!
user: User! @connection(name: "UserNotification")
}
Run Code Online (Sandbox Code Playgroud)
任何人都可以看到我的架构文件上有任何问题,并知道如何在 Appsync 上以最佳方式调试错误吗?
小智 6
众所周知,当connection指令发生更改并触发更新 DynamoDB GSI 时,就会发生这种情况。Cloudformation 对 DynamoDB GSI 有更新限制。Amplify 团队正在积极制定@key将取代该@connection指令的指令。@connection如果您要更改指令,请暂时按照以下步骤操作
@connection每次推送仅对指令进行一项更改。如果要重命名连接,请先删除该连接并进行推送,然后使用新名称添加它Resolver not found. 这是由 Cloudformation 实现造成的,其中回滚删除了解析器,但没有创建原始解析器。您可以通过在 AppSync 控制台中添加缺少的解析器来解决此问题。参考: https: //github.com/aws-amplify/amplify-cli/issues/1406#issuecomment-494533788
| 归档时间: |
|
| 查看次数: |
3464 次 |
| 最近记录: |