Skip to content

Eliminating Deprecated Enum Values from Code Gen #840

@bornbnid

Description

@bornbnid

We are looking for a solution when updating or eliminating old enum values. Currently we've marked them deprecated, which the schema picks up on. However, in Xcode these values are still generated as part of the enums and simply marked with Xcode warnings. I'd like to remove the deprecated values instead for two reasons:

  1. I want to take advantage of the Swift CaseIterable ability to use allCases to give me a list of values. Currently this would include the deprecated values as well.
  2. This keeps a large number of warnings in the generated code file, which I can't fix because it'll will just get overridden the next time we run the Generate Apollo GraphQL API run script phase.

Ideally we'd love if there was a flag or some other way of removing these deprecated values. Thanks!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    codegenIssues related to or arising from code generationenhancementIssues outlining new things we want to do or things that will make our lives as devs easier

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions