amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

Issue related to amplify push for @function for multiple queries with multiple function

Open trupa7 opened this issue 7 years ago • 7 comments

I created one function and create one query with that

type Query{
   custom_query @function(name:"myfunction")
}

and I deployed with amplify console ---> deploy (it's worked there)

and after that I added one more function and one more custom_query

type Query{
   custom_query @function(name:"myfunction")

   custom_query2 @function(name:"myfunction2")
}

and I tried to push through amplify cli (amplify push)

I updated the stack but I unable to see the changes in appsync console--->queries

trupa7 avatar Oct 15 '19 00:10 trupa7

@trupa7 After you deploy through Amplify Console, how did you bring the project to your local development environment? When the Amplify CLI carries out the amplify push command, did you see the Operation of the api category as update?

UnleashedMind avatar Oct 15 '19 17:10 UnleashedMind

First I added api from amplify cli

  1. amplify init
  2. amplify add api then updated my schema and pushed my code to git I set up amplify deploy from console. It deployed backed
    then I made some changes in my schema and tried amplify push from amplify cli instead of pushing code to git.

So, Is it advisable to do that or we can either use amplify deploy or amplify push. to push amplify api updates?

trupa7 avatar Oct 15 '19 18:10 trupa7

@trupa7 Are you managing two different environments (prod from cli and dev from console). If you are using one environment then you can push from either cli (amplify push) or console (using git push).

SwaySway avatar Oct 17 '19 17:10 SwaySway

@SwaySway : one environment. But If I push from console(git push) and if u do amplify status after completion of git push .It still show api status to update. And if you make push from cli with schema change it will make a push but I unable to see the changes in appsync

trupa7 avatar Oct 17 '19 17:10 trupa7

@trupa7 If you deployed via Amplify console first - I believe it deployed a separate backend from what you have locally.

kaustavghosh06 avatar Oct 17 '19 21:10 kaustavghosh06

@trupa7 If you deployed via Amplify console first - I believe it deployed a separate backend from what you have locally.

@kaustavghosh06 : Thanks . I think we can close this issue.

trupa7 avatar Oct 21 '19 17:10 trupa7

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

github-actions[bot] avatar May 26 '21 23:05 github-actions[bot]