fix: pass configured Neo4j database to execute_query#1482
Open
abhinavmathur-atlan wants to merge 1 commit into
Open
fix: pass configured Neo4j database to execute_query#1482abhinavmathur-atlan wants to merge 1 commit into
abhinavmathur-atlan wants to merge 1 commit into
Conversation
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
Fixes
Neo4jDriver.execute_query()so the configured database is passed to the Neo4j driver as the top-leveldatabase_argument instead of being inserted into Cypherparameters_.This keeps query parameters separate from driver configuration and allows read/search queries to run against the configured database instead of Neo4j's default database.
Type of Change
Objective
Bug fix for configured Neo4j databases: writes already use
session(database=self._database), but reads throughexecute_query()were not selecting the configured database.Testing
Validation run:
uv run --extra dev pytest tests/driver/test_neo4j_driver.pyuv run --extra dev pytest tests/driveruv run --extra dev ruff format graphiti_core/driver/neo4j_driver.py tests/driver/test_neo4j_driver.pyuv run --extra dev ruff check graphiti_core/driver/neo4j_driver.py tests/driver/test_neo4j_driver.pyuv run --extra dev pyright ./graphiti_coreI also started
DISABLE_FALKORDB=1 DISABLE_KUZU=1 DISABLE_NEPTUNE=1 uv run --extra dev pytest -m "not integration"; it progressed through the driver tests but then hit repeated errors in existing graph tests outside this driver change, so I stopped it and kept the validation scoped to the touched driver path.Breaking Changes
Checklist
make lintpasses)Related Issues
Closes #1481