Skip to content

Render node & edge labels as they appear in the database#996

Merged
kmcginnes merged 6 commits intoaws:mainfrom
kmcginnes:natural-node-labels
Jun 12, 2025
Merged

Render node & edge labels as they appear in the database#996
kmcginnes merged 6 commits intoaws:mainfrom
kmcginnes:natural-node-labels

Conversation

@kmcginnes
Copy link
Collaborator

@kmcginnes kmcginnes commented Jun 11, 2025

Description

This changes the default behavior of Graph Explorer to render the node & edge labels and attribute names as they are configured in the database.

Before this change, Graph Explorer would transform the label to be more human readable. But with the addition of the query editor, this felt like a disconnect from what the user is expected to type in the query vs what is rendered in the results.

The user is still able to override this default behavior. They can set a custom node/edge label that will then be rendered instead of the database label. And for RDF databases, prefixes are still applied.

Other Changes

The neighbor options tests were rewritten as they were not very comprehensive and they needed to be updated for the display label change. This led to the addition of the vertex type config callback in order to remove the null check in the map. This ensures that even if a neighbor's type is not in the schema it will show up in the neighbor types drop down.

I also tweaked some of the test helpers to make the test code a bit more concise and consistent.

Validation

  • Tested with all three query languages
  • Tested with custom node and edge labels

Code Review Hints

  • I suggest reviewing each commit separately

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.

@kmcginnes kmcginnes force-pushed the natural-node-labels branch from f2329ae to 52750d3 Compare June 11, 2025 23:34
@kmcginnes kmcginnes marked this pull request as ready for review June 11, 2025 23:34
@kmcginnes kmcginnes requested a review from andreachild June 11, 2025 23:34
@kmcginnes kmcginnes merged commit 17a218d into aws:main Jun 12, 2025
2 checks passed
@kmcginnes kmcginnes deleted the natural-node-labels branch June 12, 2025 20:44
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.

Revisit node and edge labelling strategy

2 participants