feat(indexer): Automatic Persisted Queries support (#629) - #655
Merged
Jaydbrown merged 6 commits intoAug 31, 2026
Conversation
Jaydbrown
added a commit
that referenced
this pull request
Aug 31, 2026
- soroban.ts / tsconfig.build.json: a merge wrote literal "\n" instead of newlines (an import statement and the file's trailing brace), breaking the TS parse. Restored real line breaks. - indexer.ts: widen executeGraphQLRequest's payload type so the APQ `extensions` (optional, may be undefined) type-checks under exactOptionalPropertyTypes. - graphql-indexer tests: #624's typed-error hierarchy replaced the DOM `AbortError` with `OperationAbortedError` for caller-initiated aborts — updated the #569 timeout/abort suite to expect it. #629's APQ adds an async WebCrypto hash before the request and sends `query: null` + hash on the first attempt; updated the timeout tests to wait for the fetch before advancing timers and the real-POST test to assert the APQ body shape. - streams.test.ts: the #622 getStreamInfos suite referenced StreamsModule without importing it in that block; added the dynamic import like the sibling describe. - indexer.test.ts: non-null assertions on fetch mock call tuples (noUncheckedIndexedAccess). npm run typecheck / lint / build and the full vitest suite (999 passing) green locally.
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.
Closes #629
Adds Automatic Persisted Queries (APQ) support to
GraphQLIndexer.query:persistis enabled (default), the first request sends a SHA-256 hash of the query instead of the full query string.PERSISTED_QUERY_NOT_FOUND, the client retries with the full query plus the hash so the server can cache it.persist: falsedisables APQ and sends the full query string directly.Depends on #653 (
feat(errors): typed error hierarchy) because this branch builds on the updatedsrc/indexer.tsto avoid merge conflicts.