Answer the question
In order to leave comments, you need to log in
What is the load on the server when using apollo-server and express?
Graphql is not new for a long time and everyone is talking about it, so it's not difficult to assume that someone who is well versed primarily in js, as well as express, measured the load on the server when using apollo-server and when using expressjs. Is there a big difference? It’s just that when I listen to those who promote graphql, then a picture arises in my head that using it, compared to c api on express, will increase the load on the server a hundred times. And almost forgot! In the answer, it would be great to indicate whether you used the dataloader in order to understand whether the database calls were optimized.
Answer the question
In order to leave comments, you need to log in
The difference is minuscule.
You can even conduct tests yourself and compare how much time it takes to compile queries. I have this overhead is about 5-6ms. If you use persisted queries and do not validate queries, then this difference is almost non-existent.
I have been using graphql in production for a long time, and this does not add any tangible load.
But it all depends on the usage scenario. If there are scenarios where it is important to do everything quickly, then of course the usual REST.
Dataloader can and should be used, but it increases development time. There are projects where it is important to do everything quickly, with graphql it is much easier.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question