I already have made a codegen using apollo-ios-cli, now I want to generate code for a new set of operations with different schema.
Do I have to modify the existing apollo-codegen-config.json or create a new one? If I have to create new one, how does the apollo-ios-cli know which file it has to use for ‘generate’?
Hi @Anil - if you want to be able to regenerate both at any time then a new codegen config file is the best approach, and to keep both with your project. I would give them names related to the schema for each.
The CLI generate
command supports a --path
parameter which lets you specify which config file should be used. By default, if you don’t specify --path
then it looks for a file named apollo-codegen-config.json
.
1 Like