Repository navigation
Inline escaped literals for Gremlin @graphQuery arguments - #186
Merged
Merged
Conversation
GumpacG
force-pushed
the
gremlin-args
branch
from
September 15, 2026 20:14
98aa4c4 to
5e9301e
Compare
xiazcy
approved these changes
Sep 21, 2026
GumpacG
force-pushed
the
gremlin-args
branch
from
September 21, 2026 18:28
5e9301e to
57171ea
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gremlin @graphQuery statements with arguments have returned HTTP 400 since v2.1.0. #175 switched argument substitution to Neptune query parameters, which works for openCypher but not Gremlin: Neptune's Gremlin endpoint has no bindings and rejects the query with Bindings in Gremlin are not supported.
This inlines the value as an escaped literal for Gremlin only, preserving #175's injection protection. openCypher keeps parameterized queries unchanged.
strings and enums are escaped and quoted, numbers and booleans emitted unquoted. A quoted placeholder always yields a quoted literal, which matters for ID arguments the graphQL parser reads as numbers substitution is a single pass, so a value containing $name cannot be read as another placeholder and prefixed argument names cannot collide.
$itself is not escaped.Testing:
The fix was run against Neptune DB 1.4.7.0 and Neptune Analytics.