Skip to content

Commit 9f794e8

Browse files
committed
fix: use executeRead in introspector
executeRead replaces the deprecated readTransaction in version 5 of the driver. In version 6 readTransaction is removed completely.
1 parent 9b738ee commit 9f794e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/introspector/src/to-internal-struct.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ async function introspectNodes(sessionFactory: () => Session): Promise<NodeMap>
5151
const nodes: NodeMap = {};
5252
// Label properties
5353
const session = sessionFactory();
54-
const labelPropsRes = await session.readTransaction((tx) =>
54+
const labelPropsRes = await session.executeRead((tx) =>
5555
tx.run(`CALL db.schema.nodeTypeProperties()
5656
YIELD nodeType, nodeLabels, propertyName, propertyTypes, mandatory
5757
RETURN *`)
@@ -85,7 +85,7 @@ async function introspectRelationships(sessionFactory: () => Session): Promise<R
8585
const rels: RelationshipMap = {};
8686

8787
// Find all relationship types and their properties (if any)
88-
const typePropsRes = await relSession.readTransaction((tx) =>
88+
const typePropsRes = await relSession.executeRead((tx) =>
8989
tx.run(`CALL db.schema.relTypeProperties()
9090
YIELD relType, propertyName, propertyTypes, mandatory
9191
RETURN *`)
@@ -114,7 +114,7 @@ async function introspectRelationships(sessionFactory: () => Session): Promise<R
114114
});
115115

116116
const escapedType = escapeLabel(cleanTypeName(relType));
117-
const relationshipsRes = await conSession.readTransaction((tx) =>
117+
const relationshipsRes = await conSession.executeRead((tx) =>
118118
tx.run(`
119119
MATCH (n)-[r:${escapedType}]->(m)
120120
WITH DISTINCT labels(n) AS from, labels(m) AS to

0 commit comments

Comments
 (0)