🐛 Fix TurboRouter dual-hash APQ lookup for Apollo Client queries (v0.10.1)#74
Merged
Conversation
Fixes critical bug where TurboRouter failed to activate for Apollo Client APQ requests when using dual-hash registration, causing 30x-50x performance degradation (600ms instead of <20ms). Problem: - TurboRegistry.get() only checked normalized and raw hashes - Never checked _apollo_hash_to_primary mapping - When query text from APQ hashed to apollo_client_hash, lookup failed - TurboRouter fell back to normal execution mode Solution: - Enhanced TurboRegistry.get() to check apollo hash mapping - Now correctly resolves Apollo Client hashes to primary hashes - Maintains LRU behavior for all lookup paths - 100% backward compatible Impact: - Restores 30x-50x performance for dual-hash APQ queries - No code changes required for existing applications - Works with most common production GraphQL client (Apollo Client) Testing: - New test: test_get_by_query_text_with_dual_hash_apollo_format - All 25 turbo-related tests pass - Full backward compatibility maintained Files changed: - src/fraiseql/fastapi/turbo.py - Enhanced get() method - tests/test_apollo_client_apq_dual_hash.py - Added regression test - pyproject.toml - Version bump to 0.10.1 - src/fraiseql/__init__.py - Version bump to 0.10.1 - CHANGELOG.md - Added release notes for 0.10.1 - RELEASE_NOTES_v0.10.1.md - Detailed release documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
evoludigit
added a commit
that referenced
this pull request
May 12, 2026
* chore(deps): bump security-critical Python dependencies ## Changes - urllib3: >=2.6.0 → >=2.7.0 (fix headers forwarded across origins, decompression-bomb bypass) - langchain-core: >=1.2.28 → >=1.3.3 (fix unsafe deserialization via load() allowlists) - banks: add >=2.4.2 constraint (fix critical RCE via Jinja2 SSTI) - cryptography: >=46.0.6 → >=47.0.0 - llama-index/llama-index-core: >=0.14.15 → >=0.14.21 - ruff: >=0.15.0 → >=0.15.12 - opentelemetry-*: >=1.39.0 → >=1.41.1 - aioboto3: >=15.0.0 → >=15.5.0 - protobuf: upper bound relaxed from <7.0 to <8.0 Resolves Dependabot alerts #74, #75, #76, #77, #78. ## Verification ✅ 3229 unit tests pass ✅ ruff checks pass Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Lionel Hamayon <lionel.hamayon@evolution-digitale.fr> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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 critical bug where TurboRouter failed to activate for Apollo Client APQ requests when using dual-hash registration, causing 30x-50x performance degradation (600ms instead of <20ms).
Problem
When queries were registered with dual-hash support for Apollo Client APQ compatibility, TurboRouter would fail to find them during query execution if the query text hashed to the
apollo_client_hashinstead of the server hash.Root Cause
TurboRegistry.get(query_text)only checked normalized and raw hashes_apollo_hash_to_primarymappingSolution
Enhanced
TurboRegistry.get()to check the apollo hash mapping after trying direct hash lookups. Now correctly resolves Apollo Client hashes to their registered primary hashes.Impact
Files Changed
src/fraiseql/fastapi/turbo.py- Enhancedget()method with apollo hash mapping lookuptests/test_apollo_client_apq_dual_hash.py- Added regression testpyproject.toml- Version bump to 0.10.1src/fraiseql/__init__.py- Version bump to 0.10.1CHANGELOG.md- Added release notes for 0.10.1RELEASE_NOTES_v0.10.1.md- Detailed release documentationTesting
test_get_by_query_text_with_dual_hash_apollo_formatvalidates the fixRelease
This PR includes:
v0.10.1createdRELEASE_NOTES_v0.10.1.md🤖 Generated with Claude Code