Skip to content

Conversation

kmcginnes
Copy link
Collaborator

@kmcginnes kmcginnes commented Jul 16, 2024

Description

  • Improve vertex schema template query by using union
  • Improved formatting for edge schema template (no query changes)
  • Move the summary API request in to a function
  • Add logger util, which is a thin wrapper around console.log() for now
  • Add debug logging around schema fetching for Gremlin Explorer
  • Fix global mock for ./utils/env

Before

g.V()
  .project("airport", "country")
  .by(V().hasLabel("airport").limit(1))
  .by(V().hasLabel("country").limit(1))
  .limit(1);

After

g.V().union(
  __.hasLabel("airport").limit(1),
  __.hasLabel("country").limit(1)
)
.fold()
.project("airport", "country")
.by(unfold().hasLabel("airport"))
.by(unfold().hasLabel("country"))

Validation

  • Tested on small database
  • Tested on large database (schema sync in roughly 1 second)

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 schema-sync-improvements branch from 9fb5126 to 66e5b57 Compare July 16, 2024 23:22
@kmcginnes kmcginnes force-pushed the schema-sync-improvements branch from 66e5b57 to 8158ad1 Compare July 16, 2024 23:37
@kmcginnes kmcginnes marked this pull request as ready for review July 16, 2024 23:46
@kmcginnes kmcginnes requested a review from michaelnchin July 16, 2024 23:47
@kmcginnes kmcginnes merged commit 44d6ac8 into aws:main Jul 17, 2024
@kmcginnes kmcginnes deleted the schema-sync-improvements branch July 17, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants