prisma-grapher
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

Prisma Grapher

Prisma generator to create an ER Diagram every time you generate your prisma client.

Inspired by prisma-erd-generator

Install

yarn add -D prisma-grapher

or

npm install -D prisma-grapher

Configure

Add to your schema.prisma

generator erd {
  provider = "prisma-grapher"
}

Generate

Run the generator

npx prisma generate

Output

Blog ERD

Options

generator erd {
  provider              = "prisma-grapher"
  output                = "./ERD.svg"
  disabled              = false
  title                 = "Blog Schema"
  ignoreEnums           = false
  lineColor             = "#004cff"
  headerBackgroundColor = "#bacefc"
  headerForegroundColor = "black"
  bodyBackgroundColor   = "white"
  bodyBackgroundColor2  = "#e8efff"
  bodyForegroundColor   = "black"
  typeForegroundColor   = "#4f83ff"
}

Package Sidebar

Install

npm i prisma-grapher

Weekly Downloads

114

Version

0.2.1

License

MIT

Unpacked Size

24.3 kB

Total Files

10

Last publish

Collaborators

  • aravindanve