fix(web): align QueryResult types with ladybugdb WASM API (#311)#455
Closed
ShunsukeHayashi wants to merge 1 commit into
Closed
fix(web): align QueryResult types with ladybugdb WASM API (#311)#455ShunsukeHayashi wants to merge 1 commit into
ShunsukeHayashi wants to merge 1 commit into
Conversation
… (#311) lbug-wasm.d.ts: - Add getAllRows() and getAllObjects() to QueryResult interface - Mark getAll() as deprecated and optional - Matches the runtime fallback chain already in lbug-adapter.ts: result.getAll?.() ?? result.getAllObjects?.() ?? result.getAllRows?.() The adapter already handles both old and new APIs gracefully. This fix ensures TypeScript types match the actual WASM module exports. Closes #311
|
@ShunsukeHayashi is attempting to deploy a commit to the NexusCore Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
CI Report✅ All checks passed Pipeline
Tests
✅ All 3649 tests passed across 1052 files 20 test(s) skipped
Coverage
📋 Full run · Coverage from Ubuntu · Generated by CI |
Broomstiq
added a commit
to Broomstiq/GitNexus
that referenced
this pull request
Mar 24, 2026
…tion The WASM backend getAllRows() returns Array<Array> (tuples), not named objects. buildGraph() already handled this for nodes (row.id ?? row[0]) but not for relationships, causing all edges to serialize as undefined_undefined_undefined -- deduplicated to 1 edge on the client. Also aligns web QueryResult types with the current @ladybugdb/wasm-core API per upstream PR abhigyanpatwari#455. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator
|
Collaborator
|
We don't use ladybug wasm anymore in the latest GitNexus version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
@ladybugdb/wasm-coremodule replaced.getAll()with.getAllRows()and.getAllObjects(). The runtime adapter (lbug-adapter.ts) already handles this with a fallback chain, but the TypeScript type definition was outdated.Closes #311
Changes
lbug-wasm.d.ts
export interface QueryResult { - getAll(): Promise<any[]>; + /** @deprecated Use getAllRows() or getAllObjects() instead */ + getAll?(): Promise<any[]>; + getAllRows?(): Promise<any[]>; + getAllObjects?(): Promise<any[]>; hasNext(): Promise<boolean>; getNext(): Promise<any>; }All three methods are optional because the adapter's fallback chain handles any combination:
Type Check
Addresses #311