Support to query vertex with custom id in Gremlin.Net SDK

@Florian Hockmann I am exploring usage of custom vertex id in our graph, when I play around with C# SDK v3.7.1 to query a vertex which has custom identifier and property added to the vertex, I get an exception:
No serializer found for type 'janusgraph.RelationIdentifier'.
Stacktrace attached.
No serializer found for type 'janusgraph.RelationIdentifier'.
Stacktrace attached.
Also attached is the image of the graph vertex in gdotv:
{
"id" : "custom_vid_002",
"label" : "vertex",
"properties" : [ {
"key" : "foo",
"value" : "fooVal",
"metaPropertyOf" : null,
"id" : "sq-Scustom_vid_002-sl",
"cardinality" : "single",
"gdotvObjectType" : "property"
}
{
"id" : "custom_vid_002",
"label" : "vertex",
"properties" : [ {
"key" : "foo",
"value" : "fooVal",
"metaPropertyOf" : null,
"id" : "sq-Scustom_vid_002-sl",
"cardinality" : "single",
"gdotvObjectType" : "property"
}
Has the support for custom vertex id been added to the SDK? (I am able to use the SDK to add a vertex which has custom id, but without any properties.)
Solution:
They are included in the NuGet package JanusGraph.Net, but you still have to use them in your code. Did you create the client as shown in the README? https://github.com/JanusGraph/janusgraph-dotnet/?tab=readme-ov-file#usage Since you're using GraphBinary, you should create the client like this: ...
GitHub
GitHub - JanusGraph/janusgraph-dotnet: JanusGraph .NET Gremlin Lang...
JanusGraph .NET Gremlin Language Variant (GLV). Contribute to JanusGraph/janusgraph-dotnet development by creating an account on GitHub.
Jump to solution
3 Replies
gdotv
gdotv11mo ago
Are you using the right IoRegistry in your C# code (JanusGraphIoRegistry), and using the right JanusGraph driver version? I've ran into this issue before and it was due to a mismatch in JanusGraph driver version leading to serialization issues.
vipulkashyap
vipulkashyapOP11mo ago
I think those are bundled up as part of the SDK
Solution
Florian Hockmann
Florian Hockmann11mo ago
They are included in the NuGet package JanusGraph.Net, but you still have to use them in your code. Did you create the client as shown in the README? https://github.com/JanusGraph/janusgraph-dotnet/?tab=readme-ov-file#usage Since you're using GraphBinary, you should create the client like this:
c#
var client = new GremlinClient(new GremlinServer("localhost", 8182),
new GraphBinaryMessageSerializer(JanusGraphTypeSerializerRegistry.Instance));
c#
var client = new GremlinClient(new GremlinServer("localhost", 8182),
new GraphBinaryMessageSerializer(JanusGraphTypeSerializerRegistry.Instance));
GitHub
GitHub - JanusGraph/janusgraph-dotnet: JanusGraph .NET Gremlin Lang...
JanusGraph .NET Gremlin Language Variant (GLV). Contribute to JanusGraph/janusgraph-dotnet development by creating an account on GitHub.
Want results from more Discord servers?
Add your server