Skip to content

feat(neo4j): implement and validate initial Cypher queries - #16

Merged
ariwired merged 1 commit into
feat/sample-scene-graphfrom
feat/cypher-queries
Nov 7, 2026
Merged

ariwired merged 1 commit into
feat/sample-scene-graphfrom
feat/cypher-queries

Conversation

@ariwired

@ariwired ariwired commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Closes #6

Stacked on #15 (retarget as the stack merges).

Queries live in backend/src/visual_graph/graph/cypher/ and are loaded by visual_graph.graph.queries.run_query, so the backend can reuse them:

  • objects_in_image, objects_by_class, relationships_in_image, objects_near
  • images_with_two_classes
  • images_with_near_pattern, images_with_left_of_pattern (structural/spatial)

Integration tests run every query against the sample scene and compare with the manually created graph. One test shows why relationships matter: a person and a chair co-occur in the image (class query matches), but the NEAR pattern query correctly returns nothing.

Verified: 19 integration tests pass against Neo4j, ruff and mypy clean.

@ariwired
ariwired merged commit 78b8ab8 into feat/sample-scene-graph Nov 7, 2026
1 check passed
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