Skip to content

Support for koa. #217

@DiegoGallegos4

Description

@DiegoGallegos4

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions