feat: add read-only query support for replica instances#2
Merged
Merged
Conversation
Add comprehensive read-only query support to enable safe querying of FalkorDB read replicas and prevent accidental write operations. Features: - Add FALKORDB_DEFAULT_READONLY config option for global read-only mode - Enhance query_graph tool with optional readOnly parameter - Add dedicated query_graph_readonly tool for explicit read-only queries - Use graph.roQuery() for read-only operations (GRAPH.RO_QUERY) - Maintain backward compatibility (default: read-write mode) Implementation: - Update FalkorDBService.executeQuery() with readOnly parameter - Add FalkorDBService.executeReadOnlyQuery() convenience method - Add config.falkorDB.defaultReadOnly setting - Update MCP tools with read-only support - Add comprehensive test coverage (24 new tests) Tests: - All 100 tests passing - Test coverage for read-only query execution - Test both roQuery() and query() code paths - Test error handling for read-only operations - Test configuration defaults Documentation: - Update README.md with read-only mode usage - Update CLAUDE.md with API documentation - Add .env.example configuration - Document use cases for replica instances Use Cases: - Connect to FalkorDB read replicas in replication setups - Prevent accidental writes in production environments - Run analytics/reporting queries safely - Provide read-only access in multi-tenant setups Breaking Changes: None Backward Compatibility: Fully maintained
Contributor
Author
|
All checks are green and tests are passing, ready to merge when you have a moment. @SecKatie |
Contributor
Author
|
I don’t have permission to create a new release or publish the package to the npm registry. Could you please cut a new release and publish the updated version to npm when you have a moment? @SecKatie |
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.
Add comprehensive read-only query support to enable safe querying of FalkorDB read replicas and prevent accidental write operations.
Features:
Implementation:
Tests:
Documentation:
Use Cases:
Breaking Changes: None
Backward Compatibility: Fully maintained