I am a bit confused about something that should be a simple task, check the existence of a document by a gremlin query and if not insert the document.

Given the following function:

```
public static async Task StoreAuditDetail(AuditDetailResponse auditDetail, string endpointUrl, string authorizationKey)
        {
          using (var cosmosClient = new DocumentClient(new Uri(endpointUrl), authorizationKey))
          {
            const string db = "iauditor-database";
            const string collection = "audit-details";
            Uri databaseUri = UriFactory.CreateDatabaseUri(db);
            DocumentCollection graph = cosmosClient.CreateDocumentCollectionIfNotExistsAsync(
              databaseUri,
              new DocumentCollection { Id = collection },
              new RequestOptions { OfferThroughput = 400 }).Result;

            List<dynamic> q1 = cosmosClient.CreateGremlinQuery<dynamic>(graph,
                $"g.V().hasLabel('audit-details').values('audit_id')"
                ).ExecuteNextAsync().Result.ToList();
            if (!q1.Contains(auditDetail.audit_id))
            {
              try
              {
                await cosmosClient.CreateDocumentAsync(graph.DocumentsLink, auditDetail);
              }
              catch (Exception ex)
              {
                throw;
              }
            }
          }
        }

```

How you can see in the following screenshot, after the first execution the document is inserted as expected:
[![enter image description here](https://i.stack.imgur.com/TdqUq.png)](https://i.stack.imgur.com/TdqUq.png)

All seems fine, but unfortunatelly if I try to rerun the function I have an ugly response:

[![enter image description here](https://i.stack.imgur.com/uUOBf.png)](https://i.stack.imgur.com/uUOBf.png)

The collection of ids it's always empty, what I am doing wrong?

Thanks in advance.