Contributions guide β
Thanks for your interest in contributing!
π Discuss first β
Before starting to work on a pull request, it's always better to open an issue first to confirm its desirability and discuss the approach with the maintainers.
π Project packages β
Generator for Prisma ORM, whose role is to parse your Prisma Schema and generate all the necessary components to run and deploy a GraphQL API tailored for AWS AppSync. |
Think of it as Prisma Client for GraphQL. Fully typed and designed for AWS Lambda AppSync Resolvers. It can handle CRUD operations with just a single line of code, or be fully extended. |
Interactive CLI tool that streamlines the setup of new Prisma-AppSync projects, making it as simple as running |
Local dev environment that mimics running Prisma-AppSync in production. It includes an AppSync simulator, local Lambda resolvers execution, a GraphQL IDE, hot-reloading, and authorizations. |
π Repository setup β
We use pnpm
as the core package manager, yarn
+ docker
for creating the AWS CDK bundle before deployment, zx
for running scripts, aws
+ cdk
CLIs for deployment.
Start with cloning the repo on your local machine:
git clone https://github.com/maoosi/prisma-appsync.git
Checkout the dev
branch (working branch):
git checkout dev
Install pre-requirements:
Step |
---|
1. Install NodeJS,Β latest LTS is recommended β |
2. InstallΒ pnpm β |
3. InstallΒ yarn@1 β |
4. Install zx β |
5. InstallΒ docker β |
6. Install theΒ AWS CLI β |
7. Install theΒ AWS CDK β |
Verify installation:
node -v && pnpm --version && yarn --version && zx --version && docker --version && aws --version && cdk --version
Install dependencies:
pnpm install
Run local dev playground:
pnpm dev
See list of commands below for more details about
pnpm dev
.
π Commands β
Command | Description |
---|---|
pnpm install | Install project dependencies. |
pnpm test | Run all unit tests and e2e tests. |
pnpm build | Build the entire prisma-appsync library. |
pnpm dev | Creates local dev setup, useful for contributing [1]. |
[1] Auto-generates a 'playground' folder (if not there already) and launches a local GraphQL + AWS AppSync server. This simulates the Prisma-AppSync AWS environment for local development, with 'playground' contents pointing to local source packages.
π Commit convention β
We use Conventional Commits β for commit messages such as:
<type>[optional scope]: <description>
- Possible types:
feat
/fix
/chore
/docs
- Possible scopes:
client
/generator
/cli
/boilerplate
/server
- Description: Short description, with issue number when relevant.
Here are some examples:
Type | Commit message |
---|---|
Bug fix | fix(client): issue #234 - JEST_WORKER_ID replaced |
New feature | feat(generator): new defaultDirective parameter |
Routine task | chore: deps updated to latest |
Docs update | docs: fix typo inside home |
π Coding guidelines β
ESLint β
We use ESLint β for both linting and formatting.
IDE Setup βWe recommend using VS Code β along with the ESLint extension β. With the settings on the right, you can have auto-fix and formatting when you save the code you are editing. | VS Code's json
|
No Prettier β
Since ESLint is already configured to format the code, there is no need to duplicate the functionality with Prettier. If you have Prettier installed in your editor, we recommend you disable it when working on the project to avoid conflict.
π License β
When you contribute code to the Prisma-AppSync project, you grant the maintainers permission to use and share your code under the project's BSD 2-Clause License. You also affirm that you are the original author of the code and have the authority to license it.