Skip to content

Fix Gremlin edge connection parsing to use key lookup instead of positional destructuring#1498

Merged
kmcginnes merged 1 commit intoaws:mainfrom
kmcginnes:fix/gremlin-edge-connection
Feb 2, 2026
Merged

Fix Gremlin edge connection parsing to use key lookup instead of positional destructuring#1498
kmcginnes merged 1 commit intoaws:mainfrom
kmcginnes:fix/gremlin-edge-connection

Conversation

@kmcginnes
Copy link
Collaborator

@kmcginnes kmcginnes commented Feb 2, 2026

Description

Fix Gremlin edge connections query returning reversed source/target vertex types compared to openCypher.

The previous implementation used positional array destructuring to parse GraphSON g:Map responses, which assumed a specific key order. Some Gremlin servers return keys in different orders, causing source and target to be swapped.

This change uses the existing parseGMap utility to look up values by key name instead of position.

Validation

  • Verified Gremlin now has the correct edge connections

Related Issues

Check List

  • I confirm that my contribution is made under the terms of the Apache 2.0
    license.
  • I have run pnpm checks to ensure code compiles and meets standards.
  • I have run pnpm test to check if all tests are passing.
  • I have covered new added functionality with unit tests if necessary.
  • I have added an entry in the Changelog.md.

@codecov
Copy link

codecov bot commented Feb 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.43%. Comparing base (c5affc5) to head (c59e6c9).
⚠️ Report is 53 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1498       +/-   ##
===========================================
+ Coverage   47.81%   63.43%   +15.62%     
===========================================
  Files         382      317       -65     
  Lines        8525     6659     -1866     
  Branches     3159     2305      -854     
===========================================
+ Hits         4076     4224      +148     
+ Misses       3070     1701     -1369     
+ Partials     1379      734      -645     
Flag Coverage Δ
unittests 63.43% <100.00%> (+15.62%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kmcginnes kmcginnes marked this pull request as ready for review February 2, 2026 16:20
@kmcginnes kmcginnes merged commit 77ca34f into aws:main Feb 2, 2026
4 checks passed
@kmcginnes kmcginnes deleted the fix/gremlin-edge-connection branch February 2, 2026 18:10
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.

Gremlin discovers edge connections in the wrong direction

2 participants