1
votes

I am creating an Angular project to use AWS AppSync by Amplify. I noticed that every time I create a new project, Amplify has to create a new AppSync API, which is inconvenient for development.

I read Amplify documents, they suggested using Codegen. But I got an error when running this command

$ amplify add codegen --appId XXXXXXXXXXX
There are no GraphQL APIs available.
Add by running $amplify api add

Any suggestion on how to add properly an existing AppSync API (created from AWS console) to an Angular project.

1
Are you sure you have setup Amplify to use the correct AWS credentials? Amplify might not be able to read from the aws account you used to create the AppSync api.Aaron_H
I gave up with Amplify, it's cool to set up a new project fast, but it's inconvenient in term of development. I am using Apollo instead, it works fine.Phong Vu
What parts do you like about Apollo over Amplify?Aaron_H
In Apollo, I can setup Dev env easily, where I just need to provide AppSync URL and API key, no need to set up the AWS credential. I may be wrong because I am new with Amplify.Phong Vu

1 Answers

0
votes

The flag should be --apiId not --appId.