gremlin-javascript | JavaScript tools for graph processing | Graph Database library
kandi X-RAY | gremlin-javascript Summary
kandi X-RAY | gremlin-javascript Summary
A mono-repository for JavaScript libraries related to the Apache TinkerPop3 framework:.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Builds a query from the given signature .
- Create a Gremlin client .
- Gets the index of the browserify bundle .
- Print an error
- Prints events to the File
gremlin-javascript Key Features
gremlin-javascript Examples and Code Snippets
Community Discussions
Trending Discussions on gremlin-javascript
QUESTION
I am able to connect to Neptune and was able to add some data to it with no issues. However, when I tried the code at https://tinkerpop.apache.org/docs/current/reference/#gremlin-dotnet-transactions it doesn't seem to work. I receive following error:
"Received data deserialized into null object message. Cannot operate on it."
I even jumped to a JS sample (https://tinkerpop.apache.org/docs/current/reference/#gremlin-javascript-transactions) and tried again. It doesn't work either.
What am I missing?
...ANSWER
Answered 2022-Mar-03 at 15:24At the time of this writing, Amazon Neptune only has support for TinkerPop version 3.4.11. The "traversal transactions" semantics using tx(), that you are referencing, is new as of 3.5.2 that was released by Apache TinkerPop in mid January 2022.
Transactions are typically only required when you need to submit multiple queries but have all of the queries bounded within a single commit, or with rollback if one of the queries were to fail. If you don't need this, then each Gremlin query sent to Neptune behaves as a single transaction.
If you do need transaction-like behavior in 3.4.11, here's a link to the documentation on how to do that in Neptune using Gremlin sessions: https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-sessions.html
If you don't need transactions, then here are examples of interacting with Neptune by submitting individual queries:
(.NET) https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-dotnet.html
(JS) https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-node-js.html
QUESTION
I'm trying to use the Translator feature as described here: https://tinkerpop.apache.org/docs/3.4.11/reference/#translators
But I get an error: "Cannot read property 'length' of undefined"
I traced it back to this line in the Gremlin source: https://github.com/apache/tinkerpop/blob/b84c3ece2a584f6634f1586f4b84c4e1c349595d/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/translator.js#L53
It looks like instructions
is coming back undefined.
Here is the code I'm testing with:
...ANSWER
Answered 2021-Jun-21 at 10:57You are doing what the documentation says and I think that's the desired way the Translator
should be used but the translate()
function actually requires a Bytecode
object therefore proper usage should be:
QUESTION
We are using gremlin-javascript
and have recently started to define a DSL to simplify our queries.
I am not sure if I've overlooked some caveat, but when attempting to use DSL methods within a repeat
step, I consistently receive (...).someDslFunction is not a function
errors, but using the same DSL function outside of repeat
works without issue.
Here is a short (contrived) DSL definition that produces this issue:
...ANSWER
Answered 2020-Feb-06 at 11:25I assume that the problem is that it's because you start your traversal with __
which is the standard TinkerPop spawn for anonymous traversals. As a result you get a GraphTraversal
created rather than your CustomDSLTraversalSource
. The TinkerPop gremlin-javascript documentation states that:
steps that are made available on a GraphTraversal should also be made available as spawns for anonymous traversals
So you probably should have your own version of __
that returns the CustomDSLTraversalSource
. If you want to see more explicitly where things are going wrong, see in the code that callOnEmptyTraversal()
returns GraphTraversal
and obviously your DSL methods won't be available on that class.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gremlin-javascript
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page