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
Typescript and Kotlin both have options to generate schema types without specifying operations, this would allow to have a single schema module that can be consumed by all modules. We have a huge graph with 6000+ types, and would like to explore the idea of producing an xcframework of schema types to speed up build times. Understandably it would add types that the app may never use, but if were willing to accept the downside of additionally types for better productivity, it could be worth the trade off. Unfortunately, I couldn't an option for this on iOS. Is this something thats going to be supported? If not, any pointers on how we can add this to our folk of codegen so that we can enable this on our end?
The text was updated successfully, but these errors were encountered:
For the schema types you'll want to use a module type of either embeddedInTarget or swiftPackage. embeddedInTarget requires you to configure and maintain the target module, whereas swiftPackage is the more automatic option; either way though you'll be getting a separate module for the schema types.
The operations configuration is where you get to separate operations from schema types through using either a relative or absolute configuration option.
Understandably it would add types that the app may never use, but if were willing to accept the downside of additionally types for better productivity, it could be worth the trade off.
There is no way to configure Apollo iOS to generate schema types for all types as it will produce Swift types for only those that are used in operations, and at least one operation is required for code generation. Note that we do have an open issue to correct some of this behaviour.
I'm going to close this issue because I think what you need is already supported. If after reading the documentation and trying the output options it's still not what you're looking for, then comment back in this issue and we can take another look.
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo iOS usage and allow us to serve you better.
Typescript and Kotlin both have options to generate schema types without specifying operations, this would allow to have a single schema module that can be consumed by all modules. We have a huge graph with 6000+ types, and would like to explore the idea of producing an xcframework of schema types to speed up build times. Understandably it would add types that the app may never use, but if were willing to accept the downside of additionally types for better productivity, it could be worth the trade off. Unfortunately, I couldn't an option for this on iOS. Is this something thats going to be supported? If not, any pointers on how we can add this to our folk of codegen so that we can enable this on our end?
The text was updated successfully, but these errors were encountered: