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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠