Jagrati Modi
Jagrati Modi

Reputation: 2088

How to connect to DocumentDB Emulator using Graph API?

How can I connect to DocumentDB Emulator using the Graph API?

As the documentation only specifies the connection settings for the DocumentDB and MongoDB. What are the connection settings for connecting emulator using Graph API?

Upvotes: 3

Views: 129

Answers (1)

Jesse Carter
Jesse Carter

Reputation: 21147

The Graph API uses the same connection as DocumentDB. Gremlin queries are issued directly against the DocumentClient object which should have been initialized with the regular DocDb credentials using the CreateGremlinQuery extension method.

Assuming you're using the .NET clients, both the graph and document operations require that you pass a reference to the collection you want to perform the operation against once your client is connected. For gremlin: var query = _client.CreateGremlinQuery<dynamic>(_collection, gremlin); where _collection is an instance of DocumentCollection.

Upvotes: 3

Related Questions