graphqlgen icon indicating copy to clipboard operation
graphqlgen copied to clipboard

Allow disabling prettier

Open stephenh opened this issue 5 years ago • 1 comments

On large schemas, prettier can take ~30+ seconds @ 100% CPU. In particular it seems to have a regular expression that just does not handle large input.

It would be nice to disable prettier for the graphqlgen output, even if a project has a prettier config for its regular source files.

As a disclaimer, it could be (and is actually likely) that having per-file output, e.g. #115 , where the total LOC output is the same, but its broken up into tinier files, would avoid the pathological runtime of the prettier regex.

So, we could potentially wait and see what the prettier performance looks like post-#115.

Although we could also add the option to disable prettier just on principle alone, although then we should also do some low-hanging-fruit clean-up of basic indentation (but not line wrapping/etc.) in the generated code.

stephenh avatar Nov 04 '18 20:11 stephenh

+1

I hope this issue will be addressed again.

There is also a problem that shareable config described in .prettierrc does not function properly.

SnO2WMaN avatar Sep 02 '19 08:09 SnO2WMaN