3 ms·
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-memo
by picardo 7y ago
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.
- klarstrup 7y agoYou can implement your GraphQL server to do either of those, it's not inherent.