Skip to content

Add batch query by edge ids#147

Merged
em3s merged 4 commits intomainfrom
feature/multi-edge-query
Feb 2, 2026
Merged

Add batch query by edge ids#147
em3s merged 4 commits intomainfrom
feature/multi-edge-query

Conversation

@YoonSung
Copy link
Copy Markdown
Contributor

Summary

Add Multi-Edge batch query API that retrieves edges by their IDs directly, optimizing the N×M combinations in unique-edge gets by querying multi-edges with source=id, target=id pattern.

Closes #

Changes

  • Add MultiEdgeQueryController with GET/POST /multi-edges/ids endpoints
  • Add MultiEdgeIdsRequest payload class for POST request body
  • Add gets(ids) overload in V3QueryService for multi-edge batch retrieval
  • Refactor existing gets(source, target) to delegate to private getsByKeys() method
  • Add 5 test cases in MultiEdgeSpec.kt
  • Add "3. Get (Multi-Edge)" section to API reference documentation

How to Test

# Run tests
./gradlew :engine:test --tests "*.MultiEdgeSpec"

# Start documentation server
cd website && npm install && npm run dev
# Then visit http://localhost:4321/api-references/query/#3-get-multi-edge

- Add MultiEdgeQueryController with GET/POST /multi-edges/ids endpoint
- Add V3QueryService.gets(ids) overload for multi-edge id-based lookup
- Extract common logic to private getsByKeys() method
- Add MultiEdgeIdsRequest payload class
- Add comprehensive tests for gets with ids functionality

The gets(ids) overload allows efficient retrieval of multiple multi-edges
by their ids in a single request, avoiding the N×M combination overhead
of the gets(source, target) method when only id-based lookup is needed.
@YoonSung YoonSung requested a review from em3s as a code owner January 29, 2026 08:42
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request module:engine labels Jan 29, 2026
@em3s em3s added first-time contributor First-time contributor to this repository and removed first-time contributor First-time contributor to this repository labels Jan 29, 2026
@em3s
Copy link
Copy Markdown
Contributor

em3s commented Feb 2, 2026

@YoonSung LGTM 👍

This looks like a solid starting point for multi-edge mget. The refactoring to extract getsByKeys() is clean and the LabelType.MULTI_EDGE validation is appropriate.

Nit: Removed some unnecessary formatting changes. Merging.

@em3s em3s merged commit 2bf8264 into main Feb 2, 2026
10 checks passed
@em3s em3s changed the title feat(multi-edge): add batch query by edge ids Add batch query by edge ids Feb 12, 2026
@em3s em3s deleted the feature/multi-edge-query branch March 1, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants