Contributions guide
Thanks for your interest in contributing! Please make sure to take a moment and read through Prisma-AppSync concept, as well as the following guide:
π Repository setup
We use pnpm
as the core package manager, yarn
and docker
for creating the AWS CDK bundle before deployment, zx
for running scripts, aws
and cdk
CLIs for deployment.
Start with cloning the repo on your local machine:
git clone https://github.com/maoosi/prisma-appsync.git
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] Automatically generates a playground folder (unless already existing), plus run a local GraphQL + AWS AppSync server pointing to the playground folder. This creates an ideal local dev environment that emulates Prisma-AppSync running on AWS locally. Everything inside playground is pointing local source packages.
π Sending Pull Request
Discuss first
Before you start to work on a feature pull request, it's always better to open a feature request issue first to discuss with the maintainers whether the feature is desired and the design of those features.
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 SetupWe 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.
π Legal
By submitting your code to the Prisma-AppSync project, you are granting the project maintainers a right to use that code and provide it to others under the BSD 2-Clause License attached to the project. You are also certifying that you wrote it and that you are allowed to license it to us.