-
Notifications
You must be signed in to change notification settings - Fork 741
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
Added option to generate a custom scalar with a prefix. #1216
Added option to generate a custom scalar with a prefix. #1216
Conversation
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.
Oooh - yeah I like this better. It's a breaking change but I think in a good way. Gonna close mine out!
/// Enum to select how to handle properties using a custom scalar from the schema. | ||
public enum CustomScalarFormat: Equatable { | ||
/// Uses a default type instead of a custom scalar. | ||
case `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.
I would call this none
rather than default
, since it's applying no formatting to custom scalars.
The test failure is a known flaky test, FYI |
- Renamed CustomScalarFormat.default to none since it isnt applying any formatting. - Added the passthroughCustomScalars flag when using passthroughWithPrefix to be safe. The CLI documentation doesnt mention that that flag is added when using customScalarsPrefix.
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.
LGTM pending the kicked build - will probably merge this tomorrow. Thanks for pointing this out!
Fixes #1214
Added an option to
ApolloCodegenOptions
to take aCustomScalarFormat
enum which can be eitherdefault
,passthrough
orpassthroughWithPrefix(String)