Closed juffalow closed 4 years ago
Perhaps using dataloader could solve this issue. Example: https://github.com/facebook/dataloader/blob/master/examples/SQL.md Will look in to it sooner. :)
If you will work with this, please let me know / share your observations.
I created a new folder: loaders, where DataLoader functionality has been handled. You can check the changes on the forked repo. https://github.com/UmerIftikhar/express-graphql-sequelize-example
Changes have been made to the graphql/types/author.js file as well. It works like a charm now.
Thank you! I will try it later today / this weekend.
DataLoader added in b377d7b16708ee7f2c26f0529edb7e7a7c7e62de.
Because of #13 now it always loads everything from the database, even if it is not requested. This can be optimized also.