How to avoid the N+1 query problem with GraphQL in Node.js?