Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single document for explanations and decisions #304

Open
marktani opened this issue Apr 30, 2018 · 0 comments
Open

Single document for explanations and decisions #304

marktani opened this issue Apr 30, 2018 · 0 comments

Comments

@marktani
Copy link
Contributor

I recently came across two use cases that would both be solved by a central document to give space for explanations and background information for decisions.

  1. In-line comments

For a boilerplate, in-line comments are a bit annoying. They should be kept out of code, such as here:

const db = new Prisma({
  typeDefs: 'src/generated/prisma.graphql', // the auto-generated GraphQL schema of the Prisma API
  endpoint: process.env.PRISMA_ENDPOINT, // the endpoint of the Prisma API (value set in `.env`)
  debug: true, // log all GraphQL queries & mutations sent to the Prisma API
  // secret: process.env.PRISMA_SECRET, // only needed if specified in `database/prisma.yml` (value set in `.env`)
}
  1. Production best practice vs. Easily getting started

Same code snippet, different context:

const db = new Prisma({
  typeDefs: 'src/generated/prisma.graphql', // the auto-generated GraphQL schema of the Prisma API
  endpoint: process.env.PRISMA_ENDPOINT, // the endpoint of the Prisma API (value set in `.env`)
  debug: true, // log all GraphQL queries & mutations sent to the Prisma API
  // secret: process.env.PRISMA_SECRET, // only needed if specified in `database/prisma.yml` (value set in `.env`)
}

secret is commented out, which allows for an easier getting started experience. However, in production I certainly do want to enable secret. This decision needs to be clearly documented, to avoid confusion.

I suggest to collect further use cases here, which can already lead as a first version of such a document 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant