Getting started video
Run the following command and follow the prompts 🙂
npx create prisma-appsync-app
After running the installation command, you should end up with the following structure:
project/ |__ handler.ts # lambda function handler (API resolver) |__ cdk/ # AWS CDK deploy boilerplate |__ prisma/ |__ schema.prisma # prisma schema (data source) |__ generated/ # auto-generated after each `npx prisma generate`
Generating the API
All the files inside the
prisma/generateddirectory will be auto-generated each time you run
npx prisma generate. Theses files contains everything required to deploy and run your API.
Updating fields or adding a new model? Simply update your
schema.prismafile, then run:
npx prisma generate
Deploying the API
Make sure to install and configure the AWS CLI and the AWS CDK CLI on your local machine. Then simply run the below CDK CLI command:
🚀🚀🚀 Done! Your GraphQL API is now ready to use.