Skip to content

Commit bff3fa8

Browse files
gilgardoshdotansimha
andauthoredDec 8, 2020
fix(cli): reload codegen config when config file changes
Co-authored-by: Dotan Simha <dotansimha@gmail.com>
1 parent 6663c7e commit bff3fa8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
 

‎.changeset/blue-lobsters-flash.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-codegen/cli': patch
3+
---
4+
5+
CLI with watch option will reload using new config on change

‎packages/graphql-codegen-cli/src/utils/watcher.ts

+1
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ export const createWatcher = (
130130
newParsedConfig.overwrite = config.overwrite;
131131
newParsedConfig.configFilePath = config.configFilePath;
132132
config = newParsedConfig;
133+
initalContext.updateConfig(config);
133134
}
134135

135136
debouncedExec();

0 commit comments

Comments
 (0)
Please sign in to comment.