Repository navigation
Test and document cache headers for HTTP QUERY requests - #10662
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The reviewed changes have no unresolved blocking issues and all approval assessments indicate readiness.
No open issues 🎉
What changed in this PR
This pull request tests and documents cache headers for HTTP QUERY requests, confirming they match equivalent POST responses when QUERY support is enabled.
Changes:
- Extends Hot Chocolate and Fusion cache-control tests to cover
POSTandQUERYrequests. - Adds reusable HTTP request helpers supporting multiple methods.
- Documents QUERY configuration, cache-key behavior, response headers, and CDN compatibility.
| File | Description |
|---|---|
website/content/docs/hotchocolate/server/cache-control.md |
Documents enabling and caching HTTP QUERY requests for Hot Chocolate. |
website/content/docs/fusion/cache-control.md |
Documents enabling and caching HTTP QUERY requests through Fusion. |
src/HotChocolate/Fusion/test/Fusion.Caching.Tests/FusionCachingTests.cs |
Verifies shared cache headers for POST and QUERY gateway requests. |
src/HotChocolate/Caching/test/Caching.Tests/HttpCachingTests.cs |
Verifies matching cache-control and Vary headers for POST and QUERY server requests. |
Review effort: Lite
This was referenced Oct 25, 2026
Merged
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
Cache-ControlandVaryon HTTP QUERY responses.SharedMaxAgeAndVary_Should_CacheinHttpCachingTestsandQuery_With_SharedMaxAge_Should_Return_SMaxAge_HeaderinFusionCachingTestsbecome theories with a POST row and a QUERY row, withEnableQueryRequestson. The QUERY row on the Hot Chocolate server matches the existing POST snapshot.Test plan
HotChocolate.Caching.TestsandHotChocolate.Fusion.Caching.Testspass on net10.0.EnableQueryRequestsoff, both QUERY rows fail (the server answers 404, and the gateway writes noCache-Control), so the rows go through the QUERY path.