Github user jorgebay commented on a diff in the pull request:

    https://github.com/apache/tinkerpop/pull/952#discussion_r222996609
  
    --- 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 --
    
    It would be nice to handle it in a more elegant way, maybe:
    
    ```javascript
    _adaptArgs(args) {
      let newObj = {};
      Object.keys(args).forEach((key) => {
        newObj[key] = this._writer.adaptObject(args[key]);
      });
      return newObj;
    }
    ```
    
    From what I understand, `args` must be serialized as a JSON Object, where 
each property value is in GraphSON2/3.


---

Reply via email to