* Which Category is your question related to? *
amplify add and remove api
* What AWS Services are you utilizing? *
AWS APPSYNC amplify api remove
* Provide additional details e.g. code snippets *
1: I have added an api
how do i do that.
P.S i havent done amplify push yet.
Transferring to the CLI repo.
@hafizali05
Just want to get exactly what happened. You've created and pushed your api before, and the api related resources have already been created in the cloud, right?
Then you made local changes without pushing them to the cloud, but you don't want to keep those local changes.
The CLI currently does not have undo command. But there's a simple workaround.
#current-cloud-backend
folder to the backend
folder.amplify-meta.json
from the #current-cloud-backend
folder to the backend
folder.backend-config.json
from the #current-cloud-backend
folder to the backend
folder.amplify api gql-compile
then if you execute "amplify status", you will see that the api category is not changed, and you can continue your development normally.
I did amplify env pull --restore and it was back to what I wanted.
Although it may slightly contradict to what I asked for as I wanted a state where it's not deleted and still keep the changes.
Pull restore takes me from start but than still I can do the cleaner way for my use case
I had a similar challenged but I resolved it by copying and replacing my #current_cloud_backend folder with the backend folder. In my case, the locally served app was faultless so check again before you follow this approach.
Most helpful comment
I did amplify env pull --restore and it was back to what I wanted.
Although it may slightly contradict to what I asked for as I wanted a state where it's not deleted and still keep the changes.
Pull restore takes me from start but than still I can do the cleaner way for my use case