Skip to content

Tighten warnMissingIds types and drop redundant Set values() calls - #2395

Merged
kmcginnes merged 3 commits into
mainfrom
review-and-type-cleanup
Oct 9, 2026
Merged

kmcginnes merged 3 commits into
mainfrom
review-and-type-cleanup

Conversation

@kmcginnes

@kmcginnes kmcginnes commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-ups from the review of #2245: tighter types on warnMissingIds, no redundant .values() calls on Sets, and a REVIEW.md rule that had been buried inside another bullet.

-warnMissingIds<T extends VertexId | EdgeId>(
-  entityLabel: "edges" | "vertices",
-  requested: readonly T[], found: readonly T[],
-  context: { data?: unknown; response?: unknown },
-)
+warnMissingIds<Label extends "vertices" | "edges">(
+  entityLabel: Label,
+  requested: readonly EntityIdByLabel[Label][], found: readonly EntityIdByLabel[Label][],
+  response: unknown,
+)
  • "vertices" now only accepts VertexId[], and "edges" only accepts EdgeId[].
  • Every connector passes its raw response the same way. The warning logs it under response, not data for Gremlin and openCypher and response for SPARQL.
  • Array.from(set.values()) becomes Array.from(set) at the 11 sites where the receiver is a Set. Map receivers keep .values().
  • REVIEW.md: "Production code that imports a devDependency" is now its own bullet instead of trailing the Runtime APIs item.

Evidence

After: warnMissingIds.test.ts uses @ts-expect-error to check that edge ids can't be reported as vertices and vertex ids can't be reported as edges. It also checks that the logged payload is { requested, missing, response }.

Merge Danger

Door: two-way

Impact: logging

For Gremlin and openCypher, the missing-ids warning now logs the database response under response instead of data.

Related

@kmcginnes
kmcginnes force-pushed the review-and-type-cleanup branch from ee9268e to a184c4d Compare October 9, 2026 01:02

@kmcginnes kmcginnes left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Approved

@kmcginnes
kmcginnes merged commit 9b2b11f into main Oct 9, 2026
4 checks passed
@kmcginnes
kmcginnes deleted the review-and-type-cleanup branch October 9, 2026 01:07
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.

1 participant