dotansimha / dotansimha/graphql-code-generator
schema-ast does not comment descriptions at the same time as including directives
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 23
Description
**Describe the bug**
As soon as `includeDirectives` is set to true, the value of `commentDescriptions` no longer matters: comments will always be generated as docstrings.
**To Reproduce**
```
schema: schema.graphql
documents: document.graphql
generates:
types.ts:
plugins:
- typescript
- typescript-operations
schema.generated.graphql:
plugins:
- 'schema-ast'
config:
includeDirectives: true
commentDescriptions: true
```
Link to Codebox for reproduction: https://codesandbox.io/s/bold-bird-wuf3p?file=/codegen.yml
**Expected behavior**
It is possible to include directives and comment descriptions at the same time.
**Schema**
```
type Query {
user(id: ID!): User!
}
"""
TESTING
"""
type User {
id: ID!
username: String!
email: String!
}
```
**Environment:**
- OS: Ubuntu 20.04
"@graphql-codegen/add": "2.0.2",
"@graphql-codegen/cli": "1.20.1",
"@graphql-codegen/schema-ast": "2.1.0",
"@graphql-codegen/typescript": "1.21.0",
"@graphql-codegen/typescript-operations": "1.17.14",
"graphql": "15.5.0""graphql": "^15.5.1",
- NodeJS: 14.x
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.