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.

Gremlin Native JavaScript Stringification

See original GitHub issue

Do you think that there’s any value in creating a JavaScript Native API for Gremlin? Under the hood this would do a stringification of the fluent commands to generate the code to execute. So the quick start would look something like this:

import { createGraph } from 'gremlin';

const g = createGraph();

g.V().has('name', 'Alice').execute((err, results) => {
  if (err) {
    return console.error(err)
  }

  console.log(results);
});

// Or with "sugar" any method that accepted a variable number of pairs of
// parameters could also accept an object a la:
const q = {name: 'Alice'};
g.V().has(q).execute((err, results) => {
...

WDYT?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
davidcrouchcommented, Apr 11, 2016

I’ve pretty much implemented what guyellis is asking for and can also confirm the pain mentioned by PommeVerte. I developed it as part of a higher-level ORM implementation and only implemented the steps that I needed, which was about 30% of all TP3 steps.

It works and is a hack, but maintenance will be a pain and I don’t think it is a smart strategy for the long term due to different TP release support not to mention the limitations with regard to supporting the Groovy language in general (not an issue for me though).

Just my $0.02.

1reaction
jbmussocommented, Apr 5, 2016

I closed this issue as it’s outside of the scope of the driver, though I’m open to continue this conversation here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gremlin Language Variants - Apache TinkerPop
A Gremlin language variant is a software library that allows a developer to write a Gremlin traversal within their native programming language.
Read more >
Integration with Amazon Neptune using Gremlin
We will use Neptune to store the data, Gremlin to query it and Ogma to visualize it. The architecture can be seen in...
Read more >
node.js - Converting Gremlin-Javascript Output into JSON
normalizeData(gremlinData: Map<string, any>) { // Do this so that JSON.stringify works for maps (Map.prototype as any).
Read more >
Working with Azure Cosmos DB and the JavaScript SDK
You can choose how you talk to Cosmos DB by choosing the API that fits your needs. You can use the SQL, Gremlin,...
Read more >
gremlin - npm
js. npm install gremlin. Gremlin-Javascript is designed to connect to a "server" that is hosting a TinkerPop-enabled graph system.
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