[ ] Regression
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Providing a definitions option that writes a TypeScript class:
definitions: {
path: path.resolve(__dirname, 'app.graphql.ts'),
outputAs: 'class',
},
This works as expected, but when running in dev mode, will keep restarting, because on every start the file is written and the change is detected by Nodemon.
No restart is necessary.
Add the following config option:
definitions: {
path: path.resolve(__dirname, 'app.graphql.ts'),
outputAs: 'class',
},
Then start in dev mode:
npm run start:dev
To prevent endless restarts.
[System Information]
OS Version : macOS
NodeJS Version : v10.5.0
NPM Version : 6.4.1
[Nest Information]
graphql version : 5.4.0
common version : 5.4.0
core version : 5.4.0
This, of course, can be fixed by adding the file to Nodemon ignore:
"ignore": ["src/**/*.spec.ts", "src/app.graphql.ts"],
Maybe needs to be documented?
Should be fixed in 5.5.0 due to #81
For the people who are using angular + nrwl nx and running ng serve, be sure to omit any comments on the schema file, as the lib will compare if there are changes and the comments were not removed.
eg. from the example (graphql.schema.ts)
/* tslint:disable */ <--- remove this
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
This, of course, can be fixed by adding the file to Nodemon ignore:
Maybe needs to be documented?