[
https://issues.apache.org/jira/browse/TINKERPOP-1959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16641943#comment-16641943
]
ASF GitHub Bot commented on TINKERPOP-1959:
-------------------------------------------
Github user spmallette commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/952#discussion_r223392966
--- Diff: docs/src/upgrade/release-3.2.x-incubating.asciidoc ---
@@ -105,6 +105,48 @@ packaged dataset that needed to be loaded through the
various IO options availab
benefit of `TinkerFactory` to help get them bootstrapped. For 3.2.10,
Grateful Dead is now more conveniently loaded
via that same method as the other toy graphs with
`TinkerFactory.createGratefulDead()`.
+==== Gremlin Javascript Script Submission
+
+Gremlin Javascript can now submit script, with optional bindings, using
the `Client` class:
+
+[source,javascript]
+----
+const gremlin = require('gremlin');
+const connection = new
gremlin.driver.Client('ws://localhost:8182/gremlin', { traversalSource: 'g' });
+
+connection.submit('g.V().tail()')
+ .then(response => {
+ console.log(response.traversers.length);
+ console.log(response.traversers[0]);
+ });
+
+connection.submit('g.V(vid)', {vid: 1})
+ .then(response => {
+ console.log(response.traversers.length);
+ console.log(response.traversers[0]);
+ });
+----
+
+and also allows translation of bytecode steps into script:
+
+[source,javascript]
+----
+const gremlin = require('gremlin');
+const graph = new gremlin.process.Graph();
+const connection = new
gremlin.driver.Client('ws://localhost:8182/gremlin', { traversalSource: 'g' });
+const translator = new gremlin.process.Translator('g');
+
+const g = graph.traversal();
+g.V().tail();
+const script = translator.translate(g.getBytecode());
--- End diff --
yeah - i think so. i will fix it.
> Provide a way to submit scripts to the server in gremlin-javascript
> -------------------------------------------------------------------
>
> Key: TINKERPOP-1959
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1959
> Project: TinkerPop
> Issue Type: Improvement
> Components: javascript
> Affects Versions: 3.2.8
> Reporter: stephen mallette
> Priority: Critical
>
> It is currently only possible to submit bytecode based requests to the server
> with gremlin-javascript. We should also provide some means for submitting
> scripts.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)