Support for koa.
DiegoGallegos4 opened this issue · 0 comments
DiegoGallegos4 commented
Are planning to bring any support async/await syntax? Saying this, neo4j queries are not concurrent but is there any alternate solution to that ctx.body gets to be populated by data.
Ex:
const showAll = async function(ctx, next) {
await db.cypher({query: .. }, (err, results) => ctx.body = results)
}
This example probably does not make much sense but his does:
const showAll = async function(ctx, next) {
const results = await db.cypher({query: .. });
ctx.body = results;
}
EDIT: #164 has an alternative for this, wrapping db.cypher with Promise.promisify. But still an upgrade needed.