Can anyone tell me where in the documentation I found this!

This is crazy but the following code seemed to work well when I ran it a couple of weeks ago - now I am returning to study it more closely but I can't find it again in the documentation! Does anyone recognise it please??

const person1Name = 'Alice'
const person2Name = 'David'

try {
// To learn more about the Cypher syntax, see The Neo4j Cypher Manual v5 - Cypher Manual
// The Reference Card is also a good resource for keywords Cypher Cheat Sheet
const writeQuery = MERGE (p1:Person { name: $person1Name }) MERGE (p2:Person { name: $person2Name }) MERGE (p1)-[:KNOWS]->(p2) RETURN p1, p2

// Write transactions allow the driver to handle retries and transient errors
const writeResult = await session.writeTransaction(tx =>, { person1Name, person2Name })
writeResult.records.forEach(record => {
const person1Node = record.get('p1')
const person2Node = record.get('p2')
Created friendship between: ${}, ${}

const readQuery = MATCH (p:Person) WHERE = $personName RETURN AS name
const readResult = await session.readTransaction(tx =>, { personName: person1Name })
readResult.records.forEach(record => {
console.log(Found person: ${record.get('name')})
} catch (error) {
console.error('Something went wrong: ', error)
} finally {
await session.close()

// Don't forget to close the driver connection when you're finished with it
await driver.close()

That looks like it's from one of our drivers documentation pages, maybe for .net? You can start here, and select whichever drivers guide looks appropriate. You should find an example like that somewhere around the section about working with sessions and transactions.

I just found it via the history in my browser from two weeks ago ...:-

javascript tab

Thanks anyway for your trouble.