DEV Community

Discussion on: Announcing TypeGraphQL 1.0 🚀

Collapse
 
idoshamun profile image
Ido Shamun

Awesome work Michal! I used TypeGraphQL for a while and it's was super fun compared to the bare GraphQL and especially combined with TypeORM. Eventually I decided to drop TypeGraphQL because of the performance. This was before v1.0. Now I see that you improved the performance dramatically but still my feeling is that if I use several features of TypeGraphQL (e.g global resolver), I might have performance issues. Are you planning tackling this in the future?

Collapse
 
michallytek profile image
Michał Lytek • Edited

Are you planning tackling this in the future?

Yes, I've started working on TypeGraphQL vNext (2.0?) which is a complete rewrite of the internals to fulfill the minimal overhead goal, as well as to provide capabilities for implementing additional features or integrations easily, using the plugins concept. No ETA yet 😉

Collapse
 
idoshamun profile image
Ido Shamun

Looking forward! Please consider an option to use TypeGraphQL just for schema generation with any runtime overhead

Thread Thread
 
michallytek profile image
Michał Lytek • Edited

There always be some overhead (because of different method signatures while using @Args etc.) but will be as minimal as possible 😉

Thread Thread
 
idoshamun profile image
Ido Shamun

Yes, I agree. But it seems you are closing the gap!
Btw, why do you use grpahql-jit and not apollo?

Thread Thread
 
michallytek profile image
Michał Lytek

You can use jit with apollo but apollo is super slow as a http server:

apollo-server-express                 1238.6
apollo-server-fastify                 1383.6
apollo-server-fastify + graphql-jit   1740.6
fastify-gql + graphql-jit             5437.2
Enter fullscreen mode Exit fullscreen mode

github.com/benawad/node-graphql-be...

Thread Thread
 
idoshamun profile image
Ido Shamun

My combination is fastify with apollo. I use their Automatic persisted queries.
The table still shows that it should be pretty slow compared to jit. I need to check it out