-
-
Notifications
You must be signed in to change notification settings - Fork 761
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
Hot Reload -- Operation is not valid due to the current state of the object #5803
Comments
I'm observing a similar error on HC 13.8.1. Suddenly my api is in this state, and keep hitting the error on all queries. Unfortunately I don't know how to reproduce. HotChocolate.SchemaException: For more details look at the
|
I just watch with |
Hi guys,
The only way this exception @glen-84 mentions If @michaelstaib can point me in a direction I would gladly contribute a PR. Cheers |
@michaelstaib do you have any ideas with this? It's actually really annoying, our app is fairly large so having to do a full rebuild just because hot chocolate breaks after a hot reload is painful. |
We will remove the Hot Reload handling completely with 15.1 which will give users the capability to implement this on their own. This is how it in general it should work ... for Hot Reload .NET has a hook. [assembly: MetadataUpdateHandler(typeof(RequestExecutorResolver.ApplicationUpdateHandler))] The update handler looks like the following: internal static class ApplicationUpdateHandler
{
private static readonly List<Action> _actions = [];
public static void RegisterForApplicationUpdate(Action action)
{
lock (_actions)
{
_actions.Add(action);
}
}
public static void UpdateApplication(Type[]? updatedTypes)
{
lock (_actions)
{
foreach (var action in _actions)
{
action();
}
}
}
} The When a Hot Reload happens we get notified on With preview 11 tomorrow I will have removed this and you can try to get it working on your end. In general we do not recommend to bundle the GraphQL server with Blazor and recommend to have separate hosts for this. I am closing this issue. |
Is there an existing issue for this?
Product
Hot Chocolate
Describe the bug
With Hot Reload enabled for a while, I start seeing the exception listed below.
Steps to reproduce
dotnet watch
.(I'm not able to be more specific.)
Relevant log output
Additional Context?
No response
Version
13.0.0-rc.7
The text was updated successfully, but these errors were encountered: