© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Apache TinkerPopAT
Apache TinkerPop•3y ago•
4 replies
Dragos Ciupureanu

AWS Neptune and gremlin-javascript versions

Hi,

I'm using the js gremlin client 3.6.2 with AWS Neptune version 1.2.1.0 and I get the following error when trying to upsert nodes with mergeV()
ResponseError: Server error: {"code":"InternalFailureException","requestId":"aa89ee40-74d5-46c1-9ad5-0bc3f2fde5c1","detailedMessage":"null: .option(LinkedHashMap, LinkedHashMap)","message":"null: .option(LinkedHashMap, LinkedHashMap)"} (599)
ResponseError: Server error: {"code":"InternalFailureException","requestId":"aa89ee40-74d5-46c1-9ad5-0bc3f2fde5c1","detailedMessage":"null: .option(LinkedHashMap, LinkedHashMap)","message":"null: .option(LinkedHashMap, LinkedHashMap)"} (599)


The code I'm writing is
const {
    t: { id, label }
} = gremlin.process;

const idMap = new Map([[id, entity.id]]);
const createMap = new Map([
            [label, 'my_vertex'],
            ['prop1', entity.prop1 || '']
        ]);
const updateMap = new Map([
            ['prop1', entity.prop1 || '']
        ]);
return g
       .mergeV(idMap)
       .option(onCreate, createMap)
       .option(onMatch, __.sideEffect(__.property(cardinality.single, updateMap)).constant(new Map()));
const {
    t: { id, label }
} = gremlin.process;

const idMap = new Map([[id, entity.id]]);
const createMap = new Map([
            [label, 'my_vertex'],
            ['prop1', entity.prop1 || '']
        ]);
const updateMap = new Map([
            ['prop1', entity.prop1 || '']
        ]);
return g
       .mergeV(idMap)
       .option(onCreate, createMap)
       .option(onMatch, __.sideEffect(__.property(cardinality.single, updateMap)).constant(new Map()));


I've tried with an object instead of a map, but no luck. The only solution I've found is to use the gremlin-javascript@3.7.0 which seems to work with the above code correctly, but I'm concerned about the client being too new for the server.

My question is: does the version of the javascript client match the version of the server (or should it)? Or should I always strive to use the latest client?
Solution
That's a strange error because the error seems to indicate that
option()
option()
is being called with two
Map
Map
arguments, but your example does not seem to indicate that you are doing that. It's interesting that 3.7.0 "fixes" it because I can't think of any reason why that would matter. Perhaps you could try 3.6.5 to see if there were somehow changes after 3.6.2 that solved this problem?
Regarding your more general question of:
My question is: does the version of the javascript client match the version of the server (or should it)? Or should I always strive to use the latest client?
Generally speaking you should follow the version table here https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-client.html - While it is possible that versions outside of those ranges in that table will work with one another, those are the versions that Neptune tests against and that are supported.
Java-based Gremlin clients to use with Amazon Neptune - Amazon Neptune
You can use either of two open-source Java-based Gremlin clients with Amazon Neptune: the Apache TinkerPop Java Gremlin client , or the Gremlin client for Amazon Neptune .
Jump to solution
Apache TinkerPop banner
Apache TinkerPopJoin
Apache TinkerPop is an open source graph computing framework and the home of the Gremlin graph query language.
1,376Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Gremlin with AWS Neptune
Apache TinkerPopATApache TinkerPop / questions
2y ago
MergeE using the gremlin javascript client on AWS Neptune don't work
Apache TinkerPopATApache TinkerPop / questions
3y ago
gremlin-go, MergeE, and Neptune
Apache TinkerPopATApache TinkerPop / questions
3y ago
Neptune, Gremlin Java & Bindings
Apache TinkerPopATApache TinkerPop / questions
13mo ago