graphql-platform
graphql-platform copied to clipboard
Support .NET 6 Hot Reload
This uses a Type Module in combination with MetadataUpdateHandlerAttribute to detect hot reloads and evict / rebuild the schema automatically:
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.
@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.
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
Closed in favor of #5638 until this space has been explored more.