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
If you want to run graphql-codegen across all of your projects, is it expected you have to run graphql-codegen --config graphql.config.js --project prj1 and then graphql-codegen --config graphql.config.js --project prj2? My initial thought was that I could just run graphql-codegen, and it would run all the projects 🤔, but that does NOT seem to be the case. Is there anyway to add a flag like... --all-projects which would loop over each project and run graphql-codegen based on it's configuration?
The text was updated successfully, but these errors were encountered:
That is a spot on observation. Codegen currently only runs one project at a time.
A few options come to mind right now:
Use one project, if all current projects need to run at the same time
Write a wrapper script that runs multiple projects sequentially or parallelly: This can be done fairly straightforward on the consumer side e.g. to run sequentially: graphql-codegen --config graphql.config.js --project prj1 && graphql-codegen --config graphql.config.js --project prj2. However, if you start to get more than a few projects, it could become efficient
Make Codegen CLI do option 2 OOTB: There are a lot to consider in this option: would projects run in parallel? Would failing one project continue? What is the terminal output if multiple projects run at the same time?
I've a feeling option 3 would need a lot of work, and 1 or 2 would be a quicker workaround if you need to unblock yourself. If you have suggestions/proposals for option 3 or other options, I'm more than happy to discuss!
If you want to run
graphql-codegen
across all of your projects, is it expected you have to rungraphql-codegen --config graphql.config.js --project prj1
and thengraphql-codegen --config graphql.config.js --project prj2
? My initial thought was that I could just rungraphql-codegen
, and it would run all the projects 🤔, but that does NOT seem to be the case. Is there anyway to add a flag like...--all-projects
which would loop over each project and rungraphql-codegen
based on it's configuration?The text was updated successfully, but these errors were encountered: