Mark Richman created TINKERPOP-2488:
---------------------------------------

             Summary: Using ws:// when Neptune requires wss:// doesn't throw 
exception
                 Key: TINKERPOP-2488
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2488
             Project: TinkerPop
          Issue Type: Bug
          Components: javascript
    Affects Versions: 3.4.8
            Reporter: Mark Richman


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.
{code:java}
#!/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)
{code}
 
 Note: using Node.js as a shell script like this requires {{"type": "module"}} 
in {{package.json}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to