-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swift: Add flag to omit deprecated enum cases #1595
Swift: Add flag to omit deprecated enum cases #1595
Conversation
@kevinmbeaulieu: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/ |
Ignore the unrelated failures in the windows 10 one. Can you add some tests for this please? |
@designatednerd Added tests for both the enabled & disabled states of the new flag |
@@ -64,6 +64,9 @@ export default class Generate extends ClientCommand { | |||
namespace: flags.string({ | |||
description: "The namespace to emit generated code into." | |||
}), | |||
omitDeprecatedEnumCases: flags.boolean({ | |||
description: "Omit deprecated enum cases from generated code [Swift only]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this default to false
to preserve existing behavior, or would that be overkill?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I intended for this to default to false to preserve existing behavior- is that not how it would behave as currently implemented? Looking at the implementation of flags.boolean
I saw "specifying a default of false is the same not specifying a default"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok (not exactly a typescript expert over here). I think that should work fine, then.
Implement feature request described in apollographql/apollo-ios#840
TODO: