Ovyerus / prismaliser

Visualise your Prisma schema!
https://prismaliser.app
MIT License
868 stars 46 forks source link

Show MongoDB embedded documents as nodes #80

Open Ovyerus opened 12 months ago

Ovyerus commented 12 months ago

When using MongoDB as a datasource, users are able to specify embedded documents with the type keyword. We don't currently handle this but I reckon it would be nice to. Reference

Example schema

datasource db {
  provider = "mongodb"
  url      = env("DATABASE_URL")
}

generator client {
  provider = "prisma-client-js"
}

model MyModel {
  id    String   @id @default(auto()) @map("_id") @db.ObjectId
  types MyType[]
}

type MyType {
  value  String
  public Boolean
}