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
Hi community, I'm trying to use graphql-codegen in watch mode to generate the schema.graphql file whenever the schema file is updated, but it seems not working, I had to stop and re-run the generate script to get the updated schema.graphql file.
Just wondering if anyone had seen this, or knows how to work with this?
They may have added support for loading ts files directly, so not sure if the extra loading step is still necessary.
I'm pretty sure this is overcomplicating things and there is a better option, I just haven't spent a lot of time looking at graphql-codgen.
Generally I just write the schema directly using fs.writeFileSync(schema.graphql, printSchema(schema)) in my dev server which is already watching/reloading
You might also want to double check if just passing file patterns that include your typescript files works, but good chance it doesn't
Hi community, I'm trying to use graphql-codegen in
watch
mode to generate theschema.graphql
file whenever the schema file is updated, but it seems not working, I had to stop and re-run the generate script to get the updatedschema.graphql
file.Just wondering if anyone had seen this, or knows how to work with this?
The codegen --verbose info:
Guide: https://pothos-graphql.dev/docs/guide/generating-client-types#generating-a-schemagraphql-file-with-graphql-code-generator
Codegen watch mode: https://the-guild.dev/graphql/codegen/docs/getting-started/development-workflow#watch-mode
Thanks! 🙏
The text was updated successfully, but these errors were encountered: