Map doesn't work in a Reactive session

Hello there

The map function using the rxSession with Reactive doesn't work! Here is the code:

const driver = neo4j.driver('bolt://localhost:7687', neo4j.auth.basic('neo4j', 'test'), { disableLosslessIntegers: true });
 
const session = driver.rxSession();
const result = session.readTransaction(tx => tx
.run(options.query, options.parameters)
.records()
.pipe(map(row => row.get(0)), materialize(), toArray()))
.subscribe(output => console.log(output));

Here is the error

ReferenceError: map is not defined
    at //server/src/api.js:242:48
    at //node_modules/neo4j-driver/lib/session-rx.js:219:20
    at Observable._subscribe (//node_modules/rxjs/src/internal/observable/defer.ts:59:15)
    at Observable._trySubscribe (//node_modules/rxjs/src/internal/Observable.ts:238:19)
    at Observable.subscribe (//node_modules/rxjs/src/internal/Observable.ts:219:14)
    at CatchOperator.call (//node_modules/rxjs/src/internal/operators/catchError.ts:105:19)
    at Observable.subscribe (//node_modules/rxjs/src/internal/Observable.ts:214:25)
    at Object.innerSubscribe (//node_modules/rxjs/src/internal/innerSubscribe.ts:111:19)
    at MergeMapSubscriber._innerSub (//node_modules/rxjs/src/internal/operators/mergeMap.ts:144:31)
    at MergeMapSubscriber._tryNext (//node_modules/rxjs/src/internal/operators/mergeMap.ts:137:10)

Any idea?

1 Like