I've been trying to come up with a way to schedule the batch loading like graphql/dataloader does with node.js process.onTick. But I can't really find a way since swift is multithreaded and I can't find any onTick.
Have you tried using this on a GraphQL server? When/where do you call try userLoader.dispatchQueue(on: req.eventLoop)? Was thinking I maybe need some kind of middleware to run after all the resolvers..
I've been trying to come up with a way to schedule the batch loading like graphql/dataloader does with node.js
process.onTick. But I can't really find a way since swift is multithreaded and I can't find anyonTick.Have you tried using this on a GraphQL server? When/where do you call
try userLoader.dispatchQueue(on: req.eventLoop)? Was thinking I maybe need some kind of middleware to run after all the resolvers..