-
-
Notifications
You must be signed in to change notification settings - Fork 799
Make request executor creation eager by default #8758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b5c46bf
to
dbb611c
Compare
7f4c14c
to
f9272df
Compare
src/HotChocolate/Core/src/Execution.Abstractions/CombinedServiceProvider.cs
Outdated
Show resolved
Hide resolved
04f689c
to
08a5eb7
Compare
08a5eb7
to
1598439
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8758 +/- ##
======================================
Coverage ? 0
======================================
Files ? 0
Lines ? 0
Branches ? 0
======================================
Hits ? 0
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements eager initialization of Hot Chocolate request executors by default. Previously, schema and request executor creation was lazy (deferred until first request), but now they are created during server startup to improve initial request performance and provide faster feedback on schema errors.
- Makes request executor creation eager by default instead of lazy
- Replaces
InitializeOnStartup()
API with newAddWarmupTask()
API for better warmup task control - Updates documentation to reflect the new eager initialization behavior
Reviewed Changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
website/src/docs/hotchocolate/v16/server/warmup.md | Rewrites documentation to reflect eager initialization as default behavior |
website/src/docs/hotchocolate/v16/migrating/migrate-from-15-to-16.md | Adds migration guide for eager initialization changes |
src/HotChocolate/Core/src/Types/SchemaOptions.cs | Adds LazyInitialization property to control initialization behavior |
src/HotChocolate/Core/src/Execution/RequestExecutorManager.cs | Removes warmup-specific logic and simplifies executor creation |
src/HotChocolate/Core/src/Execution.Abstractions/Execution/IRequestExecutorWarmupTask.cs | Adds ApplyOnlyOnStartup property to warmup task interface |
Multiple test files | Updates tests to use new AddWarmupTask() API instead of InitializeOnStartup() |
AspNetCore/Warmup files | Refactors warmup service to support new eager initialization pattern |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
||
/// <summary> | ||
/// Specifies that the <see cref="IRequestExecutor"/> should be constructed | ||
/// laz |
Copilot
AI
Oct 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment appears to be cut off. 'laz' should be completed to 'lazily'.
/// laz | |
/// lazily |
Copilot uses AI. Check for mistakes.
public bool PublishRootFieldPagesToPromiseCache { get; set; } = true; | ||
|
||
/// <summary> | ||
/// Gets or sets whether the should be initialized lazily. |
Copilot
AI
Oct 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The summary is missing the subject that should be initialized lazily. It should specify what gets initialized (e.g., 'request executor' or 'schema').
/// Gets or sets whether the should be initialized lazily. | |
/// Gets or sets whether the schema and request executor should be initialized lazily. |
Copilot uses AI. Check for mistakes.
No description provided.