【发布时间】:2019-09-22 11:06:12
【问题描述】:
使用 AWS Appsync 开发 React 应用程序并首次尝试 graphQL。我的schema.graphql 对我来说很有意义,但抛出了一个我真的不知道如何查看发生了什么的错误。
这是一个应用程序,用户可以在其中使用通知系统发帖和评论。在amplify push 上获取Resource is not in the state stackUpdateComplete 错误消息
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")
}
任何人都可以在我的架构文件上看到任何错误并知道如何在 Appsync 上以最佳方式调试错误吗?
【问题讨论】:
-
请编辑您的问题以包含您看到的实际错误消息。
-
@DanielRearden感谢您的评论。我刚刚添加了一条错误消息。
-
问:把整个栈删掉再重新构建会不会有问题?也许还检查 CloudFormation 是否有任何错误。由于对“用户”的引用,还要在 CLI 中检查 Cognito。
标签: amazon-web-services graphql aws-amplify aws-appsync