paljs / prisma-tools

Prisma tools to help you generate CRUD system for GraphQL servers
https://paljs.com
MIT License
681 stars 55 forks source link

[feature] Custom generator classes #195

Open terion-name opened 3 years ago

terion-name commented 3 years ago

Example usecase: I need to generate schema with different naming conventions (e.g. replicate Prisma1/OpenCRUD convention).

I can write custom generation class, but there is no way to pas it to parent generator without extending it and overriding. It would be great to have something like this:

class LegacyGenerator {...}
new Generator({generator: {legacy: LegacyGenerator}})

Also export current generation classes to be able to extend them

AhmedElywa commented 3 years ago

It's a good idea. Also, If you can help, you can make a pull request.

simonjoom commented 2 years ago

i m not sure but my work might help: i made a paljs working with prisma1 crud system using a moded version of nexus-plugin-prisma working with prisma3 https://github.com/paljs/prisma-tools/issues/264

can be a start?