Skip to content
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

Serialize id type in to id string #768

Merged
merged 1 commit into from
Jan 27, 2025
Merged

Conversation

kmcginnes
Copy link
Collaborator

@kmcginnes kmcginnes commented Jan 24, 2025

Description

Updates the VertexId and EdgeId value to include a prefix that represents the original type of the ID before being mapped in to Graph Explorer.

  • Number ID type - (num)1234
  • String ID type - (str)a6ca3117-92e7-10d4-5c52-a6e0fa16862d

Why?

The ID type is important for different Gremlin server implementations. Neptune is always a string, while the default for Gremlin Server and Janus Graph is a number.

When we implement URL sharing, or other forms of sharing, where the ID must be serialized to a string value we will want a way to determine if the original value was a number or a string.

In order to avoid any potential conflicts with user data string values, this type serialization is being applied judiciously so that it can be assumed to exist.

Next Steps

  • Remove Vertex.idType and Edge.idType
  • Remove VertexRef and EdgeRef

Validation

  • Verified with a smoke test in each query language
  • Verified number IDs with JanusGraph

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 marked this pull request as ready for review January 24, 2025 23:00
@andreachild
Copy link

LGTM

@kmcginnes kmcginnes merged commit 7ea1ca2 into aws:main Jan 27, 2025
1 check passed
@kmcginnes kmcginnes deleted the serialize-id-type branch January 27, 2025 19:52
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