amplify push fails after removing a model from schema.graphql
See original GitHub issueDescribe the bug Can not remove a model from schema.graphql after it was pushed/deployed.
To Reproduce Steps to reproduce the behavior:
- Initial schema.graphql
type User @model { id: ID! invitations: [Invitation] @connection(name: "UserInvitations") last_name: String first_name: String } type Invitation @model { id: ID! date: String sentTo: User @connection(name: "UserInvitations") state: String }
amplify push
- Update schema.graphql and remove Invitation
type User @model { id: ID! last_name: String first_name: String }
amplify push
- Update failed with the following error
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.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Project-level configurations - Troubleshooting guide
Scenario 1: "amplify push" fails after manually updating DynamoDB tables and GSIs from the console. Assume you have an application with a GraphQL...
Read more >AWS Amplify GraphQL Schema is causing an error
I am new to Amplify and I am trying to set up a fairly complex schema. When I run amplify push, the only...
Read more >Amplify API - AppSync - CRUD (Create Read Update Delete)
After the selected items, the GraphQL schema will open in amplify/backend/api/<datasourcename>/schema.graphql where we insert this model: type Job. @model.
Read more >Configuring build settings - AWS Amplify Hosting
backend - Run Amplify CLI commands to provision a backend, update Lambda functions, or GraphQL schemas as part of continuous deployment.
Read more >An In-Depth Guide on Amplify GraphQL API Authorization
AWS Amplify Auth gives a simple plug and play authentication and authorization ... Remove the following line from your schema.graphql :.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We’re waiting for this fix, I hope @kstro21 's solution works 😃
@kaustavghosh06 I’ve added a PR #1182 that will solve this one.