Ovyerus/prismaliser

Show MongoDB embedded documents as nodes

Ovyerus opened this issue · 0 comments

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
}