Skip to content

feat(api/graph): edges + clusters API with type filter + Redis cache#49

Merged
gracefullight merged 2 commits intomainfrom
symphony/FIR-37
Mar 21, 2026
Merged

feat(api/graph): edges + clusters API with type filter + Redis cache#49
gracefullight merged 2 commits intomainfrom
symphony/FIR-37

Conversation

@gracefullight
Copy link
Member

Summary

  • Add GET /graph/edges?type= endpoint returning edges between contacts that share an organization (self-join on experience table)
  • Add GET /graph/clusters?type= endpoint returning contact groups clustered by shared organization
  • Support company and school type filters via organization/experience tables; tag, region, meeting types return empty until backing tables exist
  • Redis caching with 5-minute TTL on both endpoints

Test plan

  • Verify GET /graph/edges?type=company returns edges between contacts sharing the same company
  • Verify GET /graph/clusters?type=school returns clusters of contacts grouped by school
  • Verify unsupported types (tag, region, meeting) return empty arrays
  • Verify Redis cache is populated on first request and served on subsequent requests
  • Verify cache expires after 5 minutes
  • Verify auth is required (401 without token)

🤖 Generated with Claude Code

gracefullight and others added 2 commits March 21, 2026 21:46
Add graph data endpoints for visualizing contact relationship networks:
- GET /graph/edges?type= returns edges between contacts sharing an organization
- GET /graph/clusters?type= returns contact groups by shared organization
- Supports company and school types via experience table; tag, region,
  meeting types return empty until their backing tables are created
- Redis caching with 5-minute TTL on both endpoints

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts:
#	apps/api/src/main.py
@gracefullight gracefullight merged commit 73c5627 into main Mar 21, 2026
2 checks passed
@gracefullight gracefullight deleted the symphony/FIR-37 branch March 21, 2026 11:16
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