Reputation: 2804
Working on a React app with AWS Appsync and trying graphQL for the first time. My schema.graphql
makes sense to me but throwing an error that I don't really know how to see what's going on.
It's an app where users can make a post and comment with a notification system. Getting Resource is not in the state stackUpdateComplete
error message on 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")
}
Can anyone see anything wrong on my schema file and know how to debug the error in the best way on Appsync?
Upvotes: 2
Views: 3660
Reputation: 76
This is known to happen when there are changes to connection
directives wich triggers updates DynamoDB GSI. Cloudformation has update limits for DynamoDB GSIs. Amplify team is actively working on @key
directive which will replace the @connection
directive. In the time being follow these steps if you're making changes to @connection
directive
@connection
directive per push. If you want to rename a connection, first remove the connection and do a push and then add it with the new nameResolver not found
. This is caused by the Cloudformation implementation where a rollback removed the resolvers but did not create the original resolver. You could overcome this issue by adding missing resolvers in AppSync console.Ref: https://github.com/aws-amplify/amplify-cli/issues/1406#issuecomment-494533788
Upvotes: 6