This code generates SDL-first Graphql types and resolvers based on a Prisma schema.
-
Run the yarn install command to download the necessary packages. yarn install
-
Copy your Prisma schema to the prisma folder.
-
Make sure that in the Prisma schema you don't have commented lines of code, otherwise the execution could fail.
1)run the command yarn cosmo
- The above command will generate a folder named 'generate' which will contain the gql schema and the basic resolvers for CRUD type operations
All the resources generated by this library must be copied to the corresponding directories in each aws appsync project
Cosmo will parse your schema.prisma
and will generate Graphql basic CRUD types and resolvers for your Prsima models. Cosmo will expose the generated code so that you can build upon that.
Please create an issue if you find any bugs! This is work in progress!