Skip to content

Conversation

@kmcginnes
Copy link
Collaborator

@kmcginnes kmcginnes commented Jan 27, 2026

Description

Add edge connection discovery that runs during schema sync/refresh. This enables
the schema graph to display edge labels showing which vertex types are connected
by each edge type.

Changes:

  • Enhanced edgeConnectionsQuery to discover edge connections between vertex
    types
  • Updated useSchemaSync to integrate edge connection discovery
  • Added EdgeDiscoveryBoundary component for schema graph
  • Added translations for edge connection labels

Goals:

  • Schema sync does not fail if edge connection discovery fails
  • Edge connections are cached with schema
  • Edge connection discovery runs after schema sync
  • Upgrading users have a schema with no edge connections
  • Edge connection discovery runs automatically if it has never ran before

Validation

This one was tough to test. I added new debug actions to setup the schema state in different scenarios. I also had connections that work perfectly, and connections that don't work to test more real world situations.

Schema Explorer

In schema explorer, if the edge connection discovery query had previously failed, then an error is shown with a retry button.

CleanShot 2026-01-27 at 20 07 14@2x

Connection Info

In the connection info screen, the last sync info area is updated to represent edge discovery errors, if they exist. The retry button executes a full refresh.

CleanShot 2026-01-27 at 20 06 56@2x

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 Jan 27, 2026

Codecov Report

❌ Patch coverage is 92.47312% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.32%. Comparing base (c5affc5) to head (49cfbea).
⚠️ Report is 48 commits behind head on main.

Files with missing lines Patch % Lines
...orer/src/connector/queries/edgeConnectionsQuery.ts 91.30% 4 Missing ⚠️
packages/graph-explorer/src/hooks/useSchemaSync.ts 91.30% 2 Missing ⚠️
...ckages/graph-explorer/src/utils/testing/DbState.ts 94.73% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1484       +/-   ##
===========================================
+ Coverage   47.81%   63.32%   +15.51%     
===========================================
  Files         382      316       -66     
  Lines        8525     6642     -1883     
  Branches     3159     2301      -858     
===========================================
+ Hits         4076     4206      +130     
+ Misses       3070     1702     -1368     
+ Partials     1379      734      -645     
Flag Coverage Δ
unittests 63.32% <92.47%> (+15.51%) ⬆️

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 force-pushed the feature/schema/discovery-on-refresh branch from 59ee527 to a9f5d0d Compare January 28, 2026 01:05
});
},
);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This just moved in to the query file since that is the only place it is used.

@kmcginnes kmcginnes force-pushed the feature/schema/discovery-on-refresh branch 3 times, most recently from 894f574 to 764061f Compare January 28, 2026 01:57
@kmcginnes kmcginnes force-pushed the feature/schema/discovery-on-refresh branch from 764061f to 49cfbea Compare January 28, 2026 02:03
@kmcginnes kmcginnes marked this pull request as ready for review January 28, 2026 02:39
@kmcginnes kmcginnes merged commit c154d03 into aws:main Jan 28, 2026
4 checks passed
@kmcginnes kmcginnes deleted the feature/schema/discovery-on-refresh branch January 28, 2026 19:34
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.

Integrate edge discovery with schema sync

2 participants