I have used AWS Appsync and I have been able to get auto-generated code for angular (an angular service was created for me with CRUD queries generated plus typescript types) based on a graphql schema file.
https://aws-amplify.github.io/docs/js/api#angular
I have also found here (thanks @Daniel Rearden) how you can generate angular services from existing graphql queries. This is nice but it is really the next part that is time consuming, writing graphql queries everytime you change you schema. As AWS has managed to do, it is possible to generate crud queries based on the schema. Sure they will generally return all fields and require all fields as input parameter but that is fine.
My question is: is there some tool available to generate angular services with crud graphql queries and typescript types like the one AWS uses? Has anybody used this outside of AWS Appsync?
I am using neo4j, apollo and angular with the grandstack starter.
I have seen ways to write your own templates to generate these types of code here. My hope is that somebody has created one of these templates for angular, similar to the one AWS has.
from Generate angular service based on graphql schema
No comments:
Post a Comment