Please use conventional commits (also known as semantic commits) to ensure consistent and descriptive commit messages when submitting PRs.
Every example should follow a number of guidelines.
- Simple and minimal instead of complex and production-ready
- Focus on one specific Prisma use case
- Easily extensible
- Clear instructions that end with a running example
- Include instructions how to use the running example
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.
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.
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 Discord.
Once approved, you can add your example to list of missing examples and start implementing it.
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 Discord.
Once approved, you can go ahead and implement the changes.