question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

amplify push fails after removing a model from schema.graphql

See original GitHub issue

Describe the bug Can not remove a model from schema.graphql after it was pushed/deployed.

To Reproduce Steps to reproduce the behavior:

  1. 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
    }
    
  2. amplify push
  3. Update schema.graphql and remove Invitation
    type User @model {
      id: ID!
      last_name: String
      first_name: String
    }
    
  4. amplify push
  5. 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:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

6reactions
zenbakiakcommented, Apr 3, 2019

We’re waiting for this fix, I hope @kstro21 's solution works 😃

5reactions
kstro21commented, Apr 2, 2019

@kaustavghosh06 I’ve added a PR #1182 that will solve this one.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found