Reputation: 3125
I tried
graph = Graph()
g = graph.traversal().withRemote(DriverRemoteConnection('ws://localhost:8182/gremlin','g'))
Upvotes: 1
Views: 923
Reputation: 46226
The "g" must be an available GraphTraversalSource
on the server you are connecting to at 'ws://localhost:8182/gremlin
. The way in which you create "g" is dependent upon the graph database you are using. If you are using the open source Gremlin Server then, you configure that GraphTraversalSource
by way an initialization script for the server as described in the "Starting Gremlin Server" section of the documentation. You can see an example of the creation of "g" in the sample script that ships with Gremlin Server also seen here. Neptune, CosmosDB, DSE Graph and perhaps JanusGraph on Compose have their own specific methods for "g" - you'd want to consult their documentation for more details.
Upvotes: 1