graphql: schema.graphql generation broken after update
Bug Report
Currently the schema.graphql still uses multiline comments, which leads to an error in my tests.
Current behavior
GraphQLError: Syntax Error: Unexpected BlockString "What change was done?".
Input Code
registerEnumType(AuditAction, {
name: 'AuditAction',
description: 'What change was done?',
});
Output schema.graphql
"""What change was done?"""
enum AuditAction {
APPROVED
ASSIGNED
...
}
Expected behavior
# What change was done?
enum AuditAction {
APPROVED
ASSIGNED
...
}
Possible Solution
Genrate correct comments with # instead of """?
At least when I do a search and replace, it does work indeed. Which package is responsible for generating that?
Environment
{
"@nestjs/axios": "^0.0.1",
"@nestjs/common": "8.0.6",
"@nestjs/config": "1.0.1",
"@nestjs/core": "8.0.6",
"@nestjs/graphql": "^9.0.2",
"@nestjs/platform-express": "^8.0.6",
"apollo-server-express": "^3.3.0",
"graphql": "^15.5.1",
"graphql-tools": "8.1.0",
"reflect-metadata": "0.1.13"
},
"devDependencies": {
"@nestjs/cli": "8.1.1",
"@nestjs/schematics": "^8.0.3",
"@nestjs/testing": "8.0.6"
}
For Tooling issues:
- Node version: v14.17.3
- Platform: Mac
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 17 (5 by maintainers)
I can also confirm this is resolved with 9.0.3+. Thank you!
@kamilmysliwiec Seems to be working fine!
https://stackblitz.com/edit/node-r7u1wy?file=index.ts
Can you test with 9.0.3? I reverted the
@graphql-tools/mergepackage back to v6.2.5Hi, I had the same error.
This is minimal project. https://stackblitz.com/edit/node-r7u1wy?file=index.ts