You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I couldn't find any examples of this, so testing the waters a bit. We have a pretty huge module graph, to the point that process starts/restarts take a long time. So I started looking into using chokidar to purge modules from the import cache, it was working pretty well but I hit a wall with Pothos.
It seems the builder pattern is a little at odds with what I'm trying to achieve, because if a module with some gql types in is re-executed, Pothos will error.
I can't see a current workaround, but I'm wondering how viable it is to somehow support putting the builder into a mode which allows redefinition of types in a robust way.
The text was updated successfully, but these errors were encountered:
Basically, if you dynamically import the file that generates the schema into the builder class (this creates a circular dependency).
The effect if this is that, the file that build the schema generally needs to import every file that makes up the schema, so it will become invalidated when anything in the schema changes. Normally the file that creates the builder would not be invalidated, but if it has a dynamic import of the build schema, it should also be invalidated, which should end up re-building the entire schema on every change. Obviously this isn't perfect, but its the best option I have come up with for this sort of builder pattern
I couldn't find any examples of this, so testing the waters a bit. We have a pretty huge module graph, to the point that process starts/restarts take a long time. So I started looking into using chokidar to purge modules from the import cache, it was working pretty well but I hit a wall with Pothos.
It seems the builder pattern is a little at odds with what I'm trying to achieve, because if a module with some gql types in is re-executed, Pothos will error.
I can't see a current workaround, but I'm wondering how viable it is to somehow support putting the builder into a mode which allows redefinition of types in a robust way.
The text was updated successfully, but these errors were encountered: