question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting Vertex by Type

See original GitHub issue

Hi, I am just trying out Exram.Gremlinq for size, And i am struggling a with some pretty basic stuff. been through the samples numerous times now but i just can’t figure out what i am doing wrong.

Using cosmos db and are trying to create a simple CRUD endpoint for some accounts. I got the connection running and is fully able to create new vertexes. They appear as expected quering them using the data explorer in azure.

But i cannot retrieve them again.

I try to get all accounts using below query. But it returns an empty list.

var accounts = _g.V<Account>();
return await accounts.ToListAsync();

Steps from above query. image

I have a similar issue when retrieving vertexes by id. The collection returned is empty.

var accountQuery = _g.V<Account.Account>().Where(v => v.Id == id.ToString());
var account = await accountQuery.FirstOrDefaultAsync();

Steps from above query image

I Setup my connection like this.

// setup connection
this._g = g.UseModel(GraphModel.FromBaseTypes<Vertex, Edge>()).UseCosmosDb(hostname, database, collection, authKey);

It is not clear to me how i can further debug query generated.

Any help or pointers would be greatly appreciated.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
danielcwebercommented, Jan 14, 2020

The Inheritance hierarchy should be in place

Sorry, didn’t spot that.

But that might be an issue?

Yes., You need to pass additional assemblies to FromBaseTypes, specifically those you need Gremlinq to find inherited types in, in your case something like typeof(Account).Assembly.

1reaction
danielcwebercommented, Jan 13, 2020

Could you post a minimal working example project structure (as zip e.g.)?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get vertex type? [SOLVED] - GSQL
In the following query I wanted to list all vertex types that comments can have REPLY_TO edges: SetAccum<STRING> @@types; OrAccum<BOOL> ...
Read more >
How to Find Vertex of a Parabola?
To find the vertex of a parabola that is in standard form y = ax 2 + bx + c: Use h =...
Read more >
java - Getting a Vertex by its Value
1 Answer 1 · Firstly, don't use row types LinkedList links , you should always specify a generic type parameter List<Vertex> . ·...
Read more >
How to Find the Vertex of a Parabola | Quadratic Equation
Get the equation in the form y = ax2 + bx + c. · Calculate -b / 2a. This is the x-coordinate of...
Read more >
Vertex Formula with Solved Examples | Vertex Form
The vertex formula is used to find the vertex of a parabola. The formula to find the vertex is (h, k) = (-b/2a,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found