apollographql / apollographql/apollo-tooling

Typescript: allow omitDeprecatedEnumCases (@deprecated directive)

Open
#1,932 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3k
Forks
460
PR merge metrics
No merged PRs in 30d

Description

[According to the docs](https://github.com/apollographql/apollo-tooling#apollo-clientcodegen-output), `apollo client:codegen` has an option to ignore deprecated values in enums (`omitDeprecatedEnumCases`), but that is only supported using swift.

I'd really need this implemented for typescript too.
Or is there any other way to remove deprecated enums from the generated types?

Contributor guide

Open the contributing guide

Research direction

Start with the apollo client:codegen command and inspect how the omitDeprecatedEnumCases option is handled for Swift. Trace the TypeScript generation path and determine where deprecated enum values are retained. Done means TypeScript output supports the option and omits enum cases marked with the @deprecated directive.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.