[ 
https://issues.apache.org/jira/browse/TINKERPOP-1959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16639844#comment-16639844
 ] 

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_r223009609
  
    --- Diff: 
gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
 ---
    @@ -216,14 +219,18 @@ class DriverRemoteConnection extends RemoteConnection 
{
           return args.map(val => this._adaptArgs(val));
         }
     
    +    if (args instanceof t.EnumValue) {
    --- End diff --
    
    this works - slightly less gross that what there now, but still kinda 
:rage1:  
    
    ```js
      _adaptArgs(args, tl) {
        if (args instanceof Object) {
          let newObj = {};
          Object.keys(args).forEach((key) => {
            if (tl && key === 'bindings')
              newObj[key] = this._adaptArgs(args[key], false);
            else
              newObj[key] = this._writer.adaptObject(args[key]);
          });
    
          return newObj;
        }
    
        return args;
      }
    ```
    
    hate that "bindings" needs special handling, but it generates weird stuff 
without 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)

Reply via email to