thingdom/node-neo4j

Support for koa.

DiegoGallegos4 opened this issue · 0 comments

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.