You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This sounds like a good addition to make. We can add it to our backlog, but we have a lot of other things to work on and it's probably not something we're going to realistically get to in the near future.
If you would like to make a contribution to the library, I'd be happy to discuss the design of this feature with you and point you in the right direction to get started on a PR though!
Thanks @tonyarnold! If you want to contribute, start by checking out our Contributors Guide to understand a bit about the development process. You'll need to clone the apollo-ios-dev repo and make PRs there.
You'll need to add a new option to ApolloCodegenConfiguration.OutputOptions for this. I expect it would like something similar to the additionalInflectionRules feature. You can look at that for an idea of where to start.
I'd recommend starting with either an RFC or just a simple PR that updates the codegen configuration to add the option to the codegen configuration before you get too far on the actual implementation. That's the area we are going to be the most picky on, because we want to make sure that user-facing API is easy to understand and use and flexible enough to handle every use case we can come up with. After we have reached consensus on what the configuration looks like, then we can talk more about the implementation details.
If you dig into that a bit and have any questions, feel free to post them here. Or I'm happy to get on a call with you sometime and go through the code a bit. Thanks so much for being willing to contribute!
Use case
We use Nick Lockwood's excellent SwiftFormat tool, which includes an
acronym
rule that we'd like to use in our codebase that states the following:Currently, Apollo's codegen defaults to capitalising the first letter of an acronym, and then lowercasing the rest.
Describe the solution you'd like
We'd like to be able to configure Apollo's code generation to output acronyms in a format where the entire acronym is uppercased.
Thanks!
The text was updated successfully, but these errors were encountered: