-
Notifications
You must be signed in to change notification settings - Fork 207
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
Add Support for Hot Reload of GraphQL Schemas #2510
Conversation
… dev/abhishekkuma/graphql-hot-reload
… dev/abhishekkuma/graphql-hot-reload
/azp run |
… dev/abhishekkuma/graphql-hot-reload
/azp run |
src/Service.Tests/Configuration/HotReload/ConfigurationHotReloadTests.cs
Outdated
Show resolved
Hide resolved
src/Service.Tests/Configuration/HotReload/ConfigurationHotReloadTests.cs
Outdated
Show resolved
Hide resolved
src/Service.Tests/Configuration/HotReload/ConfigurationHotReloadTests.cs
Show resolved
Hide resolved
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.
Thank you for this wonderful change! Excellent find, left some comments to address the status codes that we return, looks good otherwise.
/azp run |
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.
LGTM
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.
Looks good once the questions about internal server error being returned are resolved.
Assert.IsTrue(SqlTestHelper.JsonStringsDeepEqual(expectedJson.RootElement.ToString(), items.ToString())); | ||
} | ||
|
||
/// <summary> |
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.
Summary end tag
{ | ||
// Re-add GraphQL services with updated config. | ||
RuntimeConfig runtimeConfig = _configProvider!.GetConfig(); | ||
Console.WriteLine("Updating GraphQL service."); |
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.
Do we need this Console.WriteLine?
Why make this change?
What is this change?
DabConfigEvents.cs
for GraphQL schema events.HotReloadEventHandler.cs
to include handlers for GraphQL schema-related events.RuntimeConfigLoader.cs
to ensure proper firing order of events for schema eviction and creation.GraphQLSchemaCreator.cs
to handle configuration changes and update runtime entities accordingly.Startup.cs
to register hot reload event handlers and methods for refreshing and evicting the GraphQL schema.How was this tested?
Sample Request(s)
hot-reload-gql.mp4