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 also think some plugin such as typescript-operations could be optimized and exit early (and silently) if there was no change detected in the edited file. For example when I edit a file containing no graphql operation (so no gql-tag use) I expect the plugin to do nothing in watch mode. Right now it's regenerating all the operations.
So internally graphql-codegen would need to pass only the edited file to the plugin during watch mode.
Describe alternatives you've considered
Right now I'm doing it manually by splitting my configuration into multiple projects and using chokidar-cli in my scripts :
Totally agree here. We try to watch specific files by default (without the watch defined), but allow to add additional files in case something is missing. The fact that we eventually aggregate all files into a single list might limit us. I totally agree that this could be improved.
Is your feature request related to a problem? Please describe.
Currently when using the
--watch
mode, every project/plugin is run, no matter the file that changed. I think it could be optimized.Describe the solution you'd like
The most flexible solution would be to provide a
watch
glob to eachgenerates
block in the config so we can target specific files.I also think some plugin such as
typescript-operations
could be optimized and exit early (and silently) if there was no change detected in the edited file. For example when I edit a file containing no graphql operation (so no gql-tag use) I expect the plugin to do nothing in watch mode. Right now it's regenerating all the operations.So internally graphql-codegen would need to pass only the edited file to the plugin during watch mode.
Describe alternatives you've considered
Right now I'm doing it manually by splitting my configuration into multiple projects and using
chokidar-cli
in my scripts :Additional context
The text was updated successfully, but these errors were encountered: