Uh oh!
There was an error while loading. Please reload this page.
Make documentId deterministic SHA-256 string and keep schemaId as in-memory int cache key - #575
Make documentId deterministic SHA-256 string and keep schemaId as in-memory int cache key#575xperiandri with Copilot wants to merge 40 commits into
documentId deterministic SHA-256 string and keep schemaId as in-memory int cache key#575Conversation
documentId consistency for the same query contentdocumentId deterministic for identical GraphQL document contentUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
documentId deterministic for identical GraphQL document contentdocumentId deterministic as a SHA-256 string for identical GraphQL document contentUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull request overview
This PR changes GraphQL execution metadata so documentId is generated as a deterministic SHA-256 lowercase hex string from the printed query document instead of using unstable AST hash codes.
Changes:
- Adds shared
DocumentId.fromCanonicalQueryhashing helper and uses it in server execution and design-time validation cache key creation. - Updates
DocumentId-related contract types, tests, docs, and JSON fixtures frominttostring. - Replaces an inline introspection literal with a file-backed literal provider dependency.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/FSharp.Data.GraphQL.Shared/Helpers/DocumentId.fs | Adds SHA-256 document ID helper. |
src/FSharp.Data.GraphQL.Shared/FSharp.Data.GraphQL.Shared.fsproj | Includes the new helper in compilation. |
src/FSharp.Data.GraphQL.Shared/ValidationResultCache.fs | Changes validation cache key document ID type to string. |
src/FSharp.Data.GraphQL.Shared/TypeSystem.fs | Changes planning/execution plan document ID types to string. |
src/FSharp.Data.GraphQL.Server/Executor.fs | Computes document IDs via SHA-256 over ToQueryString(). |
src/FSharp.Data.GraphQL.Server/IO.fs | Updates response/result document ID contracts to string. |
src/FSharp.Data.GraphQL.Client.DesignTime/ProvidedTypesHelper.fs | Uses deterministic document ID in design-time validation keys. |
tests/FSharp.Data.GraphQL.Tests/ExecutionTests.fs | Updates document ID assertions for deterministic string hashes. |
tests/FSharp.Data.GraphQL.Tests/Literals.fs | Replaces inline JSON literal with file-backed literal provider. |
tests/FSharp.Data.GraphQL.Tests/FSharp.Data.GraphQL.Tests.fsproj | Adds literal provider package reference. |
tests/FSharp.Data.GraphQL.IntegrationTests/introspection.json | Updates fixture document ID to string hash. |
tests/FSharp.Data.GraphQL.IntegrationTests/integration-introspection.json | Updates fixture document ID to string hash. |
Packages.props | Adds central package version for literal provider. |
README.md | Updates sample output document ID to string hash. |
docs/execution-pipeline.md | Documents deterministic SHA-256 string document IDs. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…a JSON Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/ce0fba11-9043-452f-b948-e03c8b644f26 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
… object initializer syntax Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/ce0fba11-9043-452f-b948-e03c8b644f26 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/ce0fba11-9043-452f-b948-e03c8b644f26 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
…mance Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/ce0fba11-9043-452f-b948-e03c8b644f26 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/ce0fba11-9043-452f-b948-e03c8b644f26 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
…code escapes Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/ce0fba11-9043-452f-b948-e03c8b644f26 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
…ance creation Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/ce0fba11-9043-452f-b948-e03c8b644f26 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/fec46b15-afce-40da-85b4-306eae430ce0 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/fec46b15-afce-40da-85b4-306eae430ce0 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/38a5449a-9904-46f6-b33a-acf9f32a7151 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/38a5449a-9904-46f6-b33a-acf9f32a7151 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/5ee4bb8d-2ee3-4b01-ad1e-b1052d41e738 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/70eb1609-2aab-4948-8d69-52c900443420 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/70eb1609-2aab-4948-8d69-52c900443420 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/50df7657-a96d-4b4f-89a9-b012c920b492 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/345ce2da-408c-4257-81ba-49eeac04c122 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/fe5050da-a1a6-43d1-978f-18d01b969c4c Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/95956635-01ea-45da-a2fc-e89c2faafbbd Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/95956635-01ea-45da-a2fc-e89c2faafbbd Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/7ce8c26c-d831-4c14-a520-93ba8f1f1622 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/fsprojects/FSharp.Data.GraphQL/sessions/1b4b4e4f-e994-4b23-92e4-8f31ed38a207 Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
Test Results 3 files 3 suites 10m 17s ⏱️ Results for commit 5393fd9. |
Uh oh!
There was an error while loading. Please reload this page.