Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Cannot Reproduce
-
3.4.8
-
None
-
None
Description
When using the JavaScript driver, attempting to connect to Neptune via ws:// when Neptune requires wss:// does not throw an exception. The process simply exits silently.
#!/usr/bin/env node import pkg from 'gremlin'; const { structure, process, driver } = pkg; const Graph = structure.Graph; const __ = process.statics; const { t, order, cardinality, column, scope, pop, operator, P, traversal } = process; const hostname = 'neptunecluster.cluster-xxxxxxxxx.us-east-1.neptune.amazonaws.com' const port = 8182 const wspath = `ws://${hostname}:${port}/gremlin`; // doesn't throw exception if wss:// is required const DriverRemoteConnection = driver.DriverRemoteConnection; const connection = new DriverRemoteConnection(wspath, {}); const g = traversal().withRemote(connection); const result = await g.V().hasLabel("person").toList() console.log(result)
Note: using Node.js as a shell script like this requires "type": "module" in package.json