Closed anli-xsigns closed 6 months ago
Hello @anli-xsigns ! Thanks for using the plugin!
I highly recommend using GraphQL Codegen's Lifecyle hooks to format the file using your formatter of choice e.g. Prettier.
Here's an example config:
const config: CodegenConfig = {
hooks: {
afterAllFileWrite: ['prettier --write'] // `afterAllFileWrite` runs command after all files are written
},
schema: ['*.graphql'],
generates: {
// ... your usual config
},
};
You can then running Codegen as usual and the commands given to the hook will run at appropriate time. 🙂
Closing this issue because it looks like it solved the issue. Please open another issue if you see other problems. Thank you!
First of all - thanks for the amazing work! I love to use this plugin! Sorry for asking this question here - I didn't find another appropriate location: Is there a way to influence the output of the generated files? I want to
How the file is generated:
How it would be optimal in my case:
Thanks a lot for your help in advance!