Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for koa. #217

Open
DiegoGallegos4 opened this issue May 5, 2017 · 0 comments
Open

Support for koa. #217

DiegoGallegos4 opened this issue May 5, 2017 · 0 comments

Comments

@DiegoGallegos4
Copy link

DiegoGallegos4 commented May 5, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant