dotansimha / dotansimha/graphql-code-generator
Doc string and @deprecated seems to get scrapped when defining a Typed Document Node
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 23
Description
Hi,
Thank you for a nice library!
I just deprecated my first field in the backend.
``` graphql
type Role {
id: ID!
"""
Description for field
"""
roleType: UserRoleType! @deprecated(reason: "Use type")
type: UserRoleType!
}
```
Can see the deprecation note coming in just fine on the type in the codegen.
``` typescript
export type Role = {
/**
* Description for field
* @deprecated Use type
*/
roleType: UserRoleType;
type: UserRoleType;
};
```
But the Typed Document Node does not attach the deprecation, or the doc string to the result, so it doesnt show in my frontend.
``` typescript
roles?: Array<{
__typename?: 'Role'
roleType: UserRoleType
type: UserRoleType
}>
```
Do i miss something here?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.