Descriptions dropped from scalars #8327
-
|
today my scalars lost all their descriptions in generated typescript ex: /** My Scalars */
export type Scalars = {
- /* A UUID*/
ID: string;
- /** A link location*/
Url: string;
};It has been generating just fine for a while. I don't think this is a local issue because the server graphql hasn't changed. I believe this is a bug because it just started after I updated codegen. Any ideas to fix? plugins:
- typescript
- typescript-operations
- typescript-graphql-requestrelevant package.json: {
"@graphql-codegen/add": "^3.1.1",
"@graphql-codegen/cli": "^2.6.2",
"@graphql-codegen/typescript": "^2.4.8",
"@graphql-codegen/typescript-graphql-request": "^4.4.8",
"@graphql-codegen/typescript-operations": "^2.3.5",
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
|
Hi @jonathanstanley, from which version of each codegen package were you updating from? This would greatly help me narrow down the root issue, thanks! |
Beta Was this translation helpful? Give feedback.
-
|
@jonathanstanley, after some research, found out that this breaking change has been introduced with the upgrade to
|
Beta Was this translation helpful? Give feedback.
@jonathanstanley, after some research, found out that this breaking change has been introduced with the upgrade to
graphql-js^16, which dropped support for# [...]descriptions in schemas (the GraphQL spec has also been updated on this matter)The new spec states that:
# [...]syntax is used for comments (which are not collected as descriptions)" [...]"and its multiline counterpart syntax should be used for descriptions (which are collected by codegen for TS comments)