Describe the bug
Can not remove a model from schema.graphql after it was pushed/deployed.
To Reproduce
Steps to reproduce the behavior:
type Invitation @model {
id: ID!
date: String
sentTo: User @connection(name: "UserInvitations")
state: String
}
```
amplify push
type User @model {
id: ID!
last_name: String
first_name: String
}
amplify push
Embedded stack [ARN of User stack] was not successfully updated. Currently in
UPDATE_ROLLBACK_IN_PROGRESS with reason: Export ******************:GetAtt:UserDataSource:Name
cannot be deleted as it is in use by [NAME of ConnectionStack stack]
Expected behavior
Be able to remove models from schema.graphql and push/publish the changes.
Additional context
Tested using the AWS Amplify Console deploy and amplify-cli locally, version 1.1.6.
Hey can you try deleting the @connection directives first. Perform the push. Then remove the @model type and push again. Let me know if that works.
Hey @mikeparisstuff thanks for the suggestion.
But it doesn't work, the same result. Also, for additional information. After the amplify push
failed, I restored the @connection in the schema, then, run amplify push
again and it fails again now with the error
No resolver found. Service: AWSAppSync; Status Code: 404; Error Code: NotFoundException
@kstro21 Are you still stuck on this and able to reproduce with the latest version of the CLI? We weren't able to reproduce this behavior on our end.
@kaustavghosh06 I had to deploy to a new env then migrate my data.
Haven't tried it anymore. I will test it again in a new environment and will be back with the feedback.
Hi, @kaustavghosh06 same result. It is not working, but now I think I know the reason and probably will come back with a PR.
@kaustavghosh06 I've added a PR #1182 that will solve this one.
We're waiting for this fix, I hope @kstro21 's solution works :)
Most helpful comment
We're waiting for this fix, I hope @kstro21 's solution works :)