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. 


---

Reply via email to