apollographql / apollographql/apollo-tooling
Include "@deprecated" in generated TypeScript types
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 460
- PR merge metrics
- No merged PRs in 30d
Description
**Problem**
Currently the generated TypeScript types omit all deprecation information for fields. This makes it less obvious that client source code is using a deprecated field that should be removed.
**Suggested Solution**
Include `@deprecated` in the documentation block for deprecated field. This can be utilized by IDEs (such as VSCode) to mark the field as deprecated in the editor.
**Example**
Generated code:
```
/**
* Example of a deprecated field
* @deprecated
*/
deprecatedField: string | null;
```

Contributor guide
Research direction
No source file or test is named in the issue. Start by locating the TypeScript type-generation entry point and the handling of deprecated GraphQL fields; update the generated documentation block and verify that deprecated fields contain @deprecated in the output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100