WaspW
Wasp2y ago
Kumaran

Having multiple generator in schema.prisma

Hello,

Currently if I add my entities in main.wasp then the generated schema.prisma has generator in it which has js as provider. I am working on a project which has both wasp and python in it. And I would like to access db from both wasp code and python code.

My plan is to define all the entities/tables needed by both python and wasp in the main.wasp file. Wasp will take care of generating client for node.
If you can provide a way to add following generator somehow to generated schema.prisma

generator pyclient {
  provider = "prisma-client-py"
}


then I can create client for python using following simple command:
prisma generate --schema=./app/.wasp/out/db/schema.prisma --generator="prisma-client-py"


I am not sure whether this feature exists already and I couldn't find it in docs. If yes, please point me to the docs else please help me in figuring this out.

Thanks in advance.
Was this page helpful?