Search code examples
graphqlschemaserverlessaws-amplifyaws-appsync

amplify api push does not update schema in cloud and reverts locally


I am using a serverless AWS-based architecture in my react app with AppSync, Cognito, and GraphQL. In the past I have been able to update my graphql schema locally and run amplify api push and it successfully pushes all of my changes to the cloud.

Recently I have been trying to update the cloud through amplify api push as I have in the pass, and the terminal says "All resources are update in the cloud". However, it reverts my schema to the schema version I had from last push. And needless to say, it was not updated in the cloud either.

No error messages are showing in the terminal.

The change I want to make is as follows:

Before-

type Topic @model {
  id: ID!
  postID: ID!
  name: String!
}

After-

type Topic @model {
  id: ID!
  name: String!
}

Any help will be much appreciated


Solution

  • SOLUTION

    Make sure you are editing schema.graphql in the amplify/backend/api instead of current-cloud-backend/api directory