News for hackers. Stuff that matters.
Re:The dark side of GraphQL: performance by greenpizza13 on Wednesday January 01, 2020 @03:38PM (#21930457)
Things have matured quite a bit. With Apollo Server it's possible to fully understand which fields are being requested before creating and running, for example, and SQL query. Fetching only the requested data for a given query reduces in-memory footprint. Most people get the whole data object and then allow GQL to select the subset of fields the user asked for, but for cases where performance is a problem there is another solution.
Re:The dark side of GraphQL: performance by picardo on Wednesday January 01, 2020 @03:53PM (#21930549)
I haven't used Apollo Server lately. But the way you describe it doesn't address the core issue, which is the initialization of the intermediate objects in-memory. So just to give an example, if I wanted to query for the projects of listings of my company, I can write it this way in GQL:

   me { company { listings { projects { id name } } } }
This will initialize: a User, a Company, Listings and Projects of all listings.

I can also write this in SQL using a couple of joins and return an array. The memory consumption is trivial in comparison to the original request.

Re:The dark side of GraphQL: performance by klarstrup on Thursday January 02, 2020 @09:46AM (#21935705)
You can implement your GraphQL server to do either of those, it's not inherent.
Re:The dark side of GraphQL: performance by andrewem on Wednesday January 01, 2020 @03:41PM (#21930477)
You say "problem there is another solution" - what is the other solution? (I'm guessing it involves somehow telling Apollo Server which fields/related objects you will need?)