@prevalentware/prisma-cosmo
v0.1.33
Published
Prisma GraphQL generator
Downloads
1,201
Readme
Prisma - Cosmo by prevalentWare
Description
This code generates SDL-first Graphql types and resolvers based on a Prisma schema.
Installation
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.
Usage
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
Important
All the resources generated by this library must be copied to the corresponding directories in each aws appsync project
How Cosmo works?
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.
Support
Please create an issue if you find any bugs! This is work in progress!