prisma-generator-pothos-codegen icon indicating copy to clipboard operation
prisma-generator-pothos-codegen copied to clipboard

Composite types lead to some types not being generated

Open toverux opened this issue 9 months ago • 0 comments

Composite types allow to have embedded documents in Prisma schemas.

Unfortunately, they do not seem to be supported by this generator!

Repro is dead simple:

model MyModel {
  id        String      @id @default(auto()) @map("_id") @db.ObjectId
  composite MyComposite
}

type MyComposite {
  dummy String
}

This leads to several input types not being generated, such as: MyComposite, MyCompositeOrderByInput, MyCompositeCreateEnvelopeInput, MyCompositeUpdateEnvelopeInput, MyCompositeObjectEqualityInput, MyCompositeWhereInput, MyCompositeCompositeFilter.

Too bad since I have only one (but hard to get rid of) composite type that now prevents me from using this very promising library :/

I haven't wrapped my head around this library and its ecosystem yet, would this be hard to support?

toverux avatar Mar 17 '25 22:03 toverux