title: Gremlin.NET: Execute queries using .Next() raises NullReferenceException
body: <p>Starting from the Azure Cosmos DB Graph API example:
  <a href="https://github.com/Azure-Samples/azure-cosmos-db-graph-gremlindotnet-getting-started" rel="noreferrer">https://github.com/Azure-Samples/azure-cosmos-db-graph-gremlindotnet-getting-started</a></p>
  
  <p>I am interested in using <strong>Gremlin.NET</strong> (the example uses version 3.2.7) to execute queries using the <strong>C#</strong> classes instead of writing string queries and execute them using the <code>gremlinClient.SubmitAsync&lt;dynamic&gt;("...")</code> method.</p>
  
  <p>But when I execute the following code I'm getting a </p>
  
  <blockquote>
    <p>NullReferenceException at Gremlin.Net.Driver.Connection.d__14`1.MoveNext()</p>
  </blockquote>
  
  <p>when calling <code>.Next()</code></p>
  
  <pre><code>var gremlinServer = new GremlinServer(hostname, port, enableSsl: true,
      username: "/dbs/" + database + "/colls/" + collection,
      password: authKey);
  
  var graph = new Graph();
  var g = graph.Traversal().WithRemote(new DriverRemoteConnection(new GremlinClient(gremlinServer)));
  
  var vertex = g.V().HasLabel("person").Next();
  Console.WriteLine(vertex);
  </code></pre>
  
  <p>Unfortunately I haven't found any documentation on how to use <strong>Gremlin.NET</strong> it would be nice if someone of you can point me to some "getting started".</p>
  
  <p><strong>Edit:</strong>
  The query result from the Azure Cosmos DB Data Explorer looks like the following:</p>
  
  <pre><code>[
    {
      "id": "thomas",
      "label": "person",
      "type": "vertex",
      "properties": {
        "firstName": [
          {
            "id": "9015b584-375f-4005-af00-f49d6e2d6b94",
            "value": "Thomas"
          }
        ],
        "age": [
          {
            "id": "c2300d19-12a0-474a-9405-eb89466bcbb3",
            "value": 44
          }
        ]
      },
      "_isRoot": true,
      "_isFixedPosition": true
    }
  ]
  </code></pre>