Hacker News new | past | comments | ask | show | jobs | submit login

But those 15 requests are then all occurring over a local network (in the data center), not over the Internet.

The true power with GraphQL is that it might not even make all 15 calls because it will entirely depend on what you are querying for. E.g. if you query for a User but not the Orders for that User, then the request to retrieve the orders is simply skipped by GraphQL.




Also, of course, those 15 calls are occurring in parallel. I love how GraphQL makes all the complexity of marshalling data go away. Even when a GraphQL server is directly fronting an SQL database, I found the latency to be better than what I'd probably get if I was to code the calls manually.


Great point.

I have only used Apollo for GraphQL, and I found a few things about it offputting (e.g. I need a 3rd-party library to figure out what fields the client actually requested). What GraphQL server do you use? Or is Apollo + Express generally a good "default" option for basic setups?


I used Apollo server as my first GraphQL implementation but found it really cumbersome. Plus Javascript fatigue hasn't caught up with the Apollo team yet, they like to change things around every so often. Now I use Postgraphile which basically creates the API for you based on a PostgreSQL database and extend it with plugins for custom operations. Hasura is also a good option but harder to extend.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: