Skip to content

Automatic types and resolvers for basic CRUD from a Prisma Schema

License

Notifications You must be signed in to change notification settings

prevalentWare/prisma-cosmo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prisma - Cosmo by prevalentWare

Description

This code generates SDL-first Graphql types and resolvers based on a Prisma schema.

Installation

  1. Run the yarn install command to download the necessary packages. yarn install

  2. Copy your Prisma schema to the prisma folder.

  3. 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

  1. 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!

dsaldarriaga@prevalentware.com

About

Automatic types and resolvers for basic CRUD from a Prisma Schema

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published