Skip to content
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

Support .NET 6 Hot Reload #5165

Merged
merged 7 commits into from
Feb 5, 2023
Merged

Support .NET 6 Hot Reload #5165

merged 7 commits into from
Feb 5, 2023

Conversation

tobias-tengler
Copy link
Collaborator

@tobias-tengler tobias-tengler commented Jun 17, 2022

This uses a Type Module in combination with MetadataUpdateHandlerAttribute to detect hot reloads and evict / rebuild the schema automatically:

HotChocolate_HotReload

I wasn't really sure where to place the related pieces and this is more of a POC to see if this is something we want to support. But I think Hot Reloading will become increasingly more popular, so Hot Chocolate should support it.

@tobias-tengler
Copy link
Collaborator Author

tobias-tengler commented Jun 17, 2022

@michaelstaib @PascalSenn how do you feel about this? I just used a Type Module, since it's something I know and it didn't require adding anything, but I feel like maybe it's too indirect. Maybe we should have something that evicts the request executor / rebuilds the schema explicitly, since the semantics of Type Modules could change.

@michaelstaib
Copy link
Member

This looks great Tobias ... There are a couple of downstream issues with this that we need to get out of the way.

At the moment the resolver compile does not cache compiled expressions. This is something we need to to do so that we do not block hot reload for larger schemas.

But we can still go ahead and get the one into main and then fix the fallout :D

@michaelstaib michaelstaib marked this pull request as ready for review June 17, 2022 13:54
@CLAassistant
Copy link

CLAassistant commented Aug 17, 2022

CLA assistant check
All committers have signed the CLA.

@stale stale bot added the ⌛ stale Nothing happened with this issue in quite a while label Dec 23, 2022
@tobias-tengler
Copy link
Collaborator Author

Closed in favor of #5638 until this space has been explored more.

@michaelstaib michaelstaib reopened this Feb 4, 2023
@michaelstaib michaelstaib self-requested a review February 4, 2023 13:33
@michaelstaib michaelstaib self-assigned this Feb 4, 2023
@michaelstaib michaelstaib removed the ⌛ stale Nothing happened with this issue in quite a while label Feb 4, 2023
@ChilliCream ChilliCream deleted a comment from stale bot Feb 5, 2023
@michaelstaib michaelstaib merged commit e9aa3ec into main Feb 5, 2023
@michaelstaib michaelstaib deleted the tte/hot-reload branch February 5, 2023 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants