|
|
|
|
|
by zackify
3259 days ago
|
|
This is a problem. It’s shocking people blow off not including that part. The current ORM’s out there kind of suck. I have been building a production app for a couple months now and that has been the biggest annoyance. I have gotten by using eager loaded relationships and facebook’s dataloader to prevent n+1 query problems. Overall, I have found minimal extra queries. At the same time, I wish I could devote time to make an orm that works like facebook’s dataloader. It would be so awesome. In fact I might try to do something like it myself. Inside of the user resolver on a post, just return Model.eager(“user”) and have it wait to resolve on the next tick. This would get us to a perfect world with node and graphql!! |
|