Allow custom config without file and or custom conifg loader
thorlucas opened this issue ยท 3 comments
Most of my configs are module .config.ts
files in my project root. I'd love to have a codegen.config.ts
file, but it looks like graphql-codegen
does not by default add the cosmiconfig typescript loader. Browsing the source, I can't see a way to pass in the TS loader either. So it would be most ideal then if there was a way to skip loading the config altogether and just allow me to import codegenConfig from './codegen.config';
and pass that in directly.
I can take a look at this a little later and see if I can PR.
Makes sense to me! I'll see about getting this feature added this week. You are more than welcome to create a PR if you'd like!
I'm thinking I'll just add a new plugin option called config
, where if passed will use that and prevent loading the config automatically.
Thanks for the suggestion!
The release is available on:
Your semantic-release bot
@thorlucas Hopefully this works for you! If you run into any troubles let me know and we can reopen the issue. Have a good weekend!