Query works when executed in console but not in javascript
const combinedQuery = gremlin.V(profileId)
.project('following', 'follows')
.by(
__.inE('FOLLOWS').outV().dedup().id().fold()
)
.by(
__.outE('FOLLOWS').inV().dedup().id().fold()
)
const followingResult = await combinedQuery.next();
const followsResult = await combinedQuery.next();
this.logger.debug( `Serving: ${profileId} result: ${JSON.stringify( followingResult )} ` );
64507 - DEBUG [FetchRelationshipsService] Serving: a28beebb-6724-4012-917f-f7b90730dad3 result: {"value":{},"done":false}
'const combinedQuery = gremlin.V(profileId)
.project('following', 'follows')
.by(
__.inE('FOLLOWS').outV().dedup().id().fold()
)
.by(
__.outE('FOLLOWS').inV().dedup().id().fold()
)
const followingResult = await combinedQuery.next();
const followsResult = await combinedQuery.next();
this.logger.debug( `Serving: ${profileId} result: ${JSON.stringify( followingResult )} ` );
64507 - DEBUG [FetchRelationshipsService] Serving: a28beebb-6724-4012-917f-f7b90730dad3 result: {"value":{},"done":false}
'I get the logged output but when i run through console It works correctly :
{
"following": [
"c64a82c1-bae0-4380-a979-fc68d6a3a646",
"5f8cf1e3-cb3b-46b9-b2c1-6836ac13b06d"
],
"follows": [
"299eaaa9-8d1e-440e-b6d7-f82dd93dc1d9",
"5f8cf1e3-cb3b-46b9-b2c1-6836ac13b06d",
"c64a82c1-bae0-4380-a979-fc68d6a3a646"
]
}{
"following": [
"c64a82c1-bae0-4380-a979-fc68d6a3a646",
"5f8cf1e3-cb3b-46b9-b2c1-6836ac13b06d"
],
"follows": [
"299eaaa9-8d1e-440e-b6d7-f82dd93dc1d9",
"5f8cf1e3-cb3b-46b9-b2c1-6836ac13b06d",
"c64a82c1-bae0-4380-a979-fc68d6a3a646"
]
}What is wrong, why i cant have the query result correctly in js? Thanks