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
As a schema grows in size so does the schema generation.
In the current state of our schema, generating the related types takes around 2.6 seconds in average. It's not much alone but most of our tools require the types to be built in order for our types to be validated and therefore this adds an overhead on each run that ends up being a bit costly.
In our case, since we generate our types from the filesystem-based .graphql files we could look at the modification times of the files and compare that to our generated types file. Doing so allows us to skip the generation altogether when we know the result isn't going to be different in any case.
Would that be something the graphql-codegen package could implement? When dealing with filesystem handling it's not too complex but I understand we could do generation from a hosted schema as well and that gets a bit more complex in this case as we wouldn't have a version or date to assert if anything has changed.
Is this an idea that has been explored? Is the project open to this exploration otherwise?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
As a schema grows in size so does the schema generation.
In the current state of our schema, generating the related types takes around 2.6 seconds in average. It's not much alone but most of our tools require the types to be built in order for our types to be validated and therefore this adds an overhead on each run that ends up being a bit costly.
In our case, since we generate our types from the filesystem-based
.graphql
files we could look at the modification times of the files and compare that to our generated types file. Doing so allows us to skip the generation altogether when we know the result isn't going to be different in any case.Would that be something the graphql-codegen package could implement? When dealing with filesystem handling it's not too complex but I understand we could do generation from a hosted schema as well and that gets a bit more complex in this case as we wouldn't have a version or date to assert if anything has changed.
Is this an idea that has been explored? Is the project open to this exploration otherwise?
Beta Was this translation helpful? Give feedback.
All reactions