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 pull` is not pulling the changes done manually on the Appsync console to the schema and resolvers

See original GitHub issue

Describe the bug We used amplify cli to generate the environment and added api, auth and storage. Then we had to manually change the schema in order to add a new pipeline resolver and a new Query field. After we have done the changes. the amplify pull command is no pulling the changes done on the console.

Pre-Pull and Pos-Pull statuses both showing No Change against Auth, Api and Storage when we definitely have changes against Api.

Amplify CLI Version 4.18.1

To Reproduce 1- generate a new backend using amplify SDK. 2- Add GraphQL API using amplify SDK. 3- Make schema changes manually using AppSync console. (e.g. Add a new field or change existing resolver or add a new pipeline resolver) 4- use amplify pull command to pull those changes.

Expected behavior The changes made in the schema and resolvers should be pulled down and available locally.

Desktop (please complete the following information):

  • OS: Mac
  • Node Version: v12.16.3

Additional context due to this issue, amplify codegen is also not generating the correct API.swift file. It is not taking the changes done on appsync console into account.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

16reactions
massivespacecommented, Jan 16, 2021

The docs at that link state: “The amplify pull command operates similar to a git pull, fetching upstream backend environment definition changes from the cloud and updating the local environment to match that definition.” That’s not helpful. Indeed, it may be pulling the environment definition down, but why does that not include manual changes made to the environment? Is there a configuration file of sorts that is a duplicate of what is actually running in AppSync (what you see at the AWS Console), so that making edits at the console diverges the backend configuration from the actual running configuration? I’m not clear on this, but running amplify pull does not bring the resolvers, functions, or schema from the actively running AppSync into the local project. That is certain. I used the AppSync console to create my schema, resolvers, and functions, because 1) it is intuitive and easy to use, and 2) I didn’t know enough about Amplify to realize making changes at that console are not supported. I’ve had those changes in the backend overwritten twice now after upgrading the amplify tool, and it reset my entire schema, functions, and resolvers. After the first amplify upgrade, it lost my backend configuration locally entirely, and this time it overwrote my backend with a very old backend configuration.

I was hoping to find a way to sync the changes I made manually at the AWS AppSync Console back into my project, but it appears that’s not possible, in a straight forward CLI approach at least.

8reactions
flipatomscommented, Jan 30, 2021

Have the same problem as above. Used the AppSync console to use an existing DynamoDB and create schema for it. When running amplify pull I don’t get the new settings and can’t access my existing db from my app. Why was this issue closed?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I pull changes made on the AppSync web-console ...
You can do this manually by downloading the schema file from the console and replacing /amplify/backend/api/schema.graphql then running ...
Read more >
Project-level configurations - Troubleshooting guide
A change to Amplify-generated resource from outside of Amplify, such as using the AWS console, is called an "unmanaged change". The Amplify CLI...
Read more >
Monitoring and logging - AWS AppSync
Learn how to use CloudWatch to monitor your AWS AppSync GraphQL API operations. ... Sign in to the AWS Management Console and open...
Read more >
Custom Appsync / Amplify GraphQL Resolver - BatchGetItem
Custom Appsync, AWS Amplify GraphQL Resolver - BatchGetItem. When you need to fetch multiple items from DynamoDB, it's not always the right and...
Read more >
GraphQL Code Libraries, Tools and Services
A JavaScript library for application development using cloud services, which supports GraphQL backend and React components for working with GraphQL data.
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