Appsync with amplify problem generated code api service

0

Hi All,

I am having an angular 7 app and making use of the aws amplify. I already succesfully implemented the cognito authentication in my app using the aws amplify. Now i am trying to implement the appsync service into my app via the amplify cli. After doing the whole configuration and my scheme creation i am running the amplify push command which pushes all my changes to the cloud and it asks me if it should generate the code for my service containing all my queries, subscriptions and mutations. It also asks me in which language where i have chosen typescript. According the documentation(https://aws-amplify.github.io/docs/js/api) for angular it generates an API.service.ts file which i should import the APIService class from in my app module and then import it also in the component and inject the service inside the constructor. From this injected service i should be able to call all my queries and mutations. The problem i am having is that the generated API.service.ts file is not containing any APIService class but only the types and inputs. It also generated a separate graphql folder which contains a separate file with my queries, a file with my mutations and a file with the subscriptions. Any help why my generated service file doesn't contains an APIService class with my mutations and queries etc... which i can inject inside my components?

Actually i don't see the angular choice as code generation language target during the amplify push in the cli. I can only choose between javascript, typescript...

Thanks in advance.

Gerry

Edited by: gerryveltjen on Jan 2, 2019 8:33 AM

已提问 5 年前445 查看次数
1 回答
0

Hi gerryveltjen

Thank you for using AWS Amplify! This is the issue tracker for the AWS Amplify Console - a continuous deployment and hosting service for SPAs and modern web apps (https://console.amplify.aws).

The Amplify Framework is open source and the issues for the library are centrally managed on GitHub: https://github.com/aws-amplify/amplify-js/issues. Please create an issue in the GitHub repo.

Thanks!

AWS
已回答 5 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则