Skip to content

Commit 7281b4d

Browse files
authored
testkit-backend: handle CypherMap conversion to native (#637)
1 parent c8f48fa commit 7281b4d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

testkit-backend/cypher-native-binders.js

+5
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ export function cypherToNative (c) {
6767
return value
6868
case 'CypherList':
6969
return value.map(cypherToNative)
70+
case 'CypherMap':
71+
return Object.entries(value).reduce((acc, [key, val]) => {
72+
acc[key] = cypherToNative(val)
73+
return acc
74+
}, {})
7075
}
7176
console.log(`Type ${name} is not handle by cypherToNative`, c)
7277
const err = 'Unable to convert ' + c + ' to native type'

0 commit comments

Comments
 (0)