jbmusso / gremlin-javascript

JavaScript tools for graph processing in Node.js and the browser inspired by the Apache TinkerPop API
MIT License
214 stars 63 forks source link

No such property: TinkerFactory for class: Script6 (Error 597) #70

Closed guyellis closed 7 years ago

guyellis commented 7 years ago

Using this module I'm connecting to my Graph.

If I execute something simple like this:

  const gremlin = 'graph = 55 * 2';
  client.execute(gremlin, (err, result) => {
...

then I get back the expected result. If I try and use library method like this:

  const gremlin = 'graph = TinkerFactory.createModern()';
  client.execute(gremlin, (err, result) => {
...

then I get this type of error:

Error: No such property: TinkerFactory for class: Script6 (Error 597)
    at GremlinClient.handleProtocolMessage (/users/.../node_modules/gremlin/lib/GremlinClient.js:174:39)

How do I setup my graph to work with common functions that are available from the Gremlin REPL?

jbmusso commented 7 years ago

This may not be related to gremlin-javascript. It looks likes you want to start Gremlin Server with an existing graph created using TinkerFactory.createModern(). Your gremlin-server.yml file should point to a .groovy file which instantiates and exposes the graph instance.

Quick question: what version of TinkerPop are you using?

guyellis commented 7 years ago

Thanks @jbmusso - Tinkerpop 3.2.3 I believe.

You're right - this isn't related to gremlin-javascript so I'll close this. Thanks for your help!