Skip to content

Latest commit

 

History

History
348 lines (259 loc) · 7.78 KB

CONTRIBUTING.md

File metadata and controls

348 lines (259 loc) · 7.78 KB

Contribution Guidelines

Commit messages

Please use conventional commits (also known as semantic commits) to ensure consistent and descriptive commit messages when submitting PRs.

General guidelines

Every example should follow a number of guidelines.

Example guidelines

  • Simple and minimal instead of complex and production-ready
  • Focus on one specific Prisma use case
  • Easily extensible

README guidelines

  • Clear instructions that end with a running example
  • Include instructions how to use the running example

Example structure

For each language, there should be one example that shows how to:

  • use Prisma client in a script
  • build a GraphQL server using Prisma client
  • build a GraphQL server using Prisma client with authentication and permissions
  • build a GraphQL server using Prisma client with realtime GraphQL subscriptions
  • build a REST API with Prisma client
  • build a CLI application with Prisma client

The schemas and developed APIs should be consistent across languages. This enables easier testing of the examples. The domain for all applications (except the CLI app) is a simple blogging application.

Ways to contribute

Adding a missing example

The easiest way to contribute is by adding a missing example. Check this GitHub issue to see which examples are currently missing. When adding a new example, please use the suggested example structure.

Adding a new example

Before submitting a PR for a new example, please first open an issue that explains the idea of the example and specifies what it will look like (e.g. how the Prisma datamodel will be defined or what kind of API will be built). It'll then be discussed in the issue whether your example is going to be added to the collection. To accelerate the process, you can ping @nikolasburk in the public Prisma Slack.

Once approved, you can add your example to list of missing examples and start implementing it.

Improving an existing example

If you find a bug in an example, please feel free to open an issue or submit a PR so the bug gets fixed. If you want to make structural changes to an existing example (e.g. changing the datamodel or the API operations), please open an issue about this first where the changes can be discussed. To accelerate the process, you can ping @nikolasburk in the public Prisma Slack.

Once approved, you can go ahead and implement the changes.

Improving a README

The READMEs for all projects are being auto-generated based on the templates located in ./.github/readmes. If you find a typo or other parts of the README that should be improved, please do not edit the README directly but instead add your changes to the corresponding template.

For example, if you found an issue in the typescript/graphql README, do not edit the ./typescript/graphql/README.md file but instead add your changes to ./.github/readmes/typescript/graphql/README.md. Then build the READMEs using our custom script:

cd .github/tools
yarn build-readmes