I'm trying to get this to work with vapor 3's async api, but I cannot figure out how to do this without the resolver accepting a Future instead of the map (synchronously). I couldn't even hack it through wait() because it's not allowed for EventLoopFutures.
resolve: { src, arguments, context, info in
guard let connectable = context as? DatabaseConnectable else { throw MissingContext() }
return try MessageController().getById(1, on: connectable) //.wait()
}
I'm trying to get this to work with vapor 3's async api, but I cannot figure out how to do this without the resolver accepting a Future instead of the map (synchronously). I couldn't even hack it through
wait()
because it's not allowed for EventLoopFutures.