A Neo4j Client somewhat inspired by ApolloClient.
The client is explicit states and events so user code can always check the current state and trust it.
Connections are invisible in the code. We work with read
and write
statements.
This full chaining mechanism of Link's in ApolloClient is not implentented as this stage, but ideally will at some point.
See test file for more usage examples.
const boltLink = new BoltLink(url, auth, opts);
const client = new Neo4jClient({ link: boltLink });
async function run(q) {
try {
const { id, queryPromise } = await client.read({ statement: q });
return await queryPromise;
} catch (e) {
console.log("errored: ", e);
throw e;
}
}