Skip to content

Make Gremlin traversal source configurable #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 3, 2021

Conversation

michaelnchin
Copy link
Member

Issue #, if available: #206

Description of changes:

  • Add new section to %%graph_notebook_config input for Gremlin-specific options
  • Support for specifying the traversal source to use for Gremlin queries, in case the name of the traversal source differs from the previously hardcoded default of g.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@krlawrence krlawrence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something to consider is that not all Gremlin servers will be accessible by a user and therefore they will not have control as much over the naming of the "GraphTraversalSource" object (a.k.a. g). We should think through whether we want to allow all users to have the option to change this and have the backend database tell them via an error message that it is not allowed or explicitly prevent it as part of our parameter processing on the graph-notebook side.

@michaelnchin
Copy link
Member Author

Thanks for the feedback @krlawrence. Hard checks have been implemented to block traversal_source from being changed when using a Neptune host, as is currently done for the SPARQL path config option. For all other hosts, we will catch the GremlinServerError returned after the fact, and output a more helpful error message.

krlawrence
krlawrence previously approved these changes Nov 3, 2021
@michaelnchin michaelnchin merged commit de3475c into main Nov 3, 2021
@michaelnchin michaelnchin deleted the Config-Traversal-Source branch November 3, 2021 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants