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
Is your feature request related to a problem? Please describe.
GraphQL Codegen is amazingly powerful, but performance can be lacklustre at times. This issue is to open a conversation about what could be done to improve performance.
Describe the solution you'd like
There are a number of optimizations that could be put in place when ran in watch mode; I'm not sure which of these are already implemented?
Files that have been parsed can be cached, and only re-parsed when the file watcher indicates they have changed
Detected GraphQL documents in a TypeScript file can be cached, and logic put in place such that when a file changes if the GraphQL within it has not changed then there's no action necessary for that file
Parsing of extracted GraphQL documents can be cached
Parsing of the GraphQL schema can be cached
Validation can be cached
Type generation itself could be cached so that only types related to the changed document(s) need to be regenerated
A comparison could be performed on the output versus the previous output so that files are only written if doing so would result in a concrete change, reducing overhead for TypeScript
Ultimately, it would be wonderful if adding a field to a GraphQL query in a large codebase could result in the generated code being output in under one second (ideally faster).
Describe alternatives you've considered
No response
Is your feature request related to a problem? Please describe.
No response
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
GraphQL Codegen is amazingly powerful, but performance can be lacklustre at times. This issue is to open a conversation about what could be done to improve performance.
Describe the solution you'd like
There are a number of optimizations that could be put in place when ran in watch mode; I'm not sure which of these are already implemented?
Ultimately, it would be wonderful if adding a field to a GraphQL query in a large codebase could result in the generated code being output in under one second (ideally faster).
Describe alternatives you've considered
No response
Is your feature request related to a problem? Please describe.
No response
The text was updated successfully, but these errors were encountered: