Open
Description
Describe the bug
A recent version of the code generator started adding comments to the fields, this is great!
However, if the comment contained a blank line, the generator will add a single space at the end of that line. This is probably because every line is indented by a single space.
This leads to the following warnings when adding the file with git:
<stdin>:201: trailing whitespace.
*
<stdin>:221: trailing whitespace.
*
<stdin>:224: trailing whitespace.
*
warning: 3 lines add whitespace errors.
To Reproduce
Steps to reproduce the behavior:
- My GraphQL schema:
type Foo {
"""
This is the first line of the documentation, it will be followed by an empty line.
Here is the last line, there is an empty line in between.
"""
bar: String
}
- My GraphQL operations:
n/a
- My
codegen.yml
config file:
overwrite: true
schema: http://localhost:4000/graphql
generates:
src/types.ts:
plugins:
- "typescript"
Expected behavior
I expected there to not be a trailing space on those lines.
Environment:
- OS: macOS 10.15.4
@graphql-codegen/...
:
"@graphql-codegen/cli": "^1.13.3",
"@graphql-codegen/typescript": "^1.13.3",
"@graphql-codegen/typescript-resolvers": "^1.13.3",- NodeJS: v12.12.0
Additional context
n/a