-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prisma generate
takes >20 seconds after adding typegraphql-prisma
#90
Comments
Try emitting source code (TS files) instead of transpilled code into Might be related to #10 |
Thanks, this helped a bit (or at least, moved the time from Not necessarily a typegraphql-prisma question, but are you aware of a good pattern to alter all the outputted files? They've got a bunch of unused imports / local vars that causes |
Yeah emitting the source files comes with a load of new issues, like eslint/tsc errors, not to mention starting any ts server takes a while to boot is there a way to disable the generation of resolvers and only generate Inputs, Args and Models? |
Please create a separate issue in order to track this |
Is anyone actively working on this issue? The generation time is incredibly long, while I only have two tables:
|
@Colliot2 disable on the fly transpilation and emit source code files |
how do I do this? I have |
@at-vpd |
Thanks for the quick reply - I got it working by bringing TS down a version, I was on v5.2.2, v5.0.4 brings it down to 8 seconds rather than 70s. |
Why is transpilation so much longer? When I use prisma v4 I get a 8s generation (with transpilation), but when switching to v5 it goes to 47s. I can stop emiting transpilation but then I run into other problems. I will try to give more info as I dig into my own problem (nx + pnpm + prisma v5) I tried downgrading TypeScript version to |
I ended up downgrading to I tried multiple versions with the same codebase, my schema file is relatively simple.
|
Yeah it was working fine for me on I don't think setting I settled on |
for anybody watching this issue, i'm pretty sure @MichalLytek fixed it in 0.27.1. Time spent generating has dropped from 60s to 5s on my project |
im still at 30s for my project, using 0.27.1 |
I also noticed significant improvement on I tried pothos though meanwhile and it was very fast for me (around |
Describe the Bug
Not sure if this is a bug or a feature request, but it takes more 20 seconds to run
prisma generate
with the typegraphql generator enabled. Generating the prisma client itself takes 500ms.If this is a known issue and you just haven't gotten around to doing some perf profiling, let me know and I'll be happy to dig in myself
To Reproduce
I'm hesitant to share my entire schema file publicly, but am happy to send it privately if you need it to diagnose. It has 31 models averaging 6-10 columns, and 66 relations.
Expected Behavior
I'd expect generation to take a few seconds at most
Logs
Environment (please complete the following information):
typegraphql-prisma
version 0.12.0The text was updated successfully, but these errors were encountered: