6

What I want to accomplish: I have edited an amplify + AppSync project on the AppSync web console and I want to pull it onto my local machine.

What I did:

I have initialized an amplify project with the Amplify CLI by executing three commands:

amplify init
amplify add api
amplify push

(the added api is GraphQL)

Next I edited some of the auto generated GraphQL resolvers on the AppSync web console. (I have tested the edited resolvers with a client app -> they worked)

Afterwards however, when I execute a pull in the Amplify CLI:

amplify pull

it only pulls changes made to the local files before the last Amplify CLI push command,

so any changes made to the AppSync web console are not taken into account by the Amplify CLI pull command.

Questions:

  1. Is this expected behavior?
  2. Is there a way to include changes made to the Web Console in the Amplify CLI pull command? (especially changed resolvers)

Versions:

amplify cli: 4.13.3

Additional Things I Discovered That Could Be Helpful:

AWS-CloudFormation also only shows updates when changes are made using the Amplify CLI.

The AWS-S3 bucket that holds the amplify projects files, also only mirrors the changes pushed using the Amplify CLI.

1 Answers1

3

You can do this manually by downloading the schema file from the console and replacing /amplify/backend/api/schema.graphql then running amplify push.

There is an issue open to automate this here: https://github.com/aws-amplify/amplify-cli/issues/1220

Mitchell Jeppson
  • 187
  • 3
  • 11
  • Thank you for your Answer! Unfortunately my main interest is to pull multiple edited resolvers from the web console. Which would also be possible to do manually, but would be very time consuming without automation.(I edited the Question so it is more clear now) So I guess your workaround is the only solution we have right now. Until the AWS Team includes the Web console changes in the cli pull command. – ThinkingBoutCode Aug 30 '20 at 22:45
  • @ThinkingBoutCode are you able to pull the updated resolvers using amplify-cli or by any other way? I am also facing the same issue. – HackRx Sep 10 '21 at 20:06