Using CLI version 0.2.0 (The latest version supported by apollo-ios)
The same issue is present when using 0.6.0 (latest current version)
We're trying to upgrade our version of apollo-ios. This means updating our version of the CLI (coming from apollo-codegen v0.17). Generating our API.swift file with all of our queries produced a 180MB file. We had seen this previously and the resolution was to disable merging fields from fragment spreads. However, the output of apollo-cli 0.2.0 doesn't change when we use the --mergeInFieldsFromFragmentSpreads flag.
Here is a small sample query that can be used to illustrate the issue:
query Hub($useForce: Boolean) {
hubsInfo(useForce: $useForce) {
hubs {
...hubInfo
}
}
}
fragment hubInfo on Hub {
discriminator
label {
...formattedTextInfo
}
}
fragment formattedTextInfo on FormattedText {
spans {
text
format {
italic
strong
}
}
}
Generating using apollo-cli v0.6.0 with and without --mergeInFieldsFromFragmentSpreads produced the following output:
API.swift.txt
Here is the expected output, generated with apollo-codegen v0.17:
API.swift.txt
Using CLI version 0.2.0 (The latest version supported by apollo-ios)
The same issue is present when using 0.6.0 (latest current version)
We're trying to upgrade our version of apollo-ios. This means updating our version of the CLI (coming from apollo-codegen v0.17). Generating our API.swift file with all of our queries produced a 180MB file. We had seen this previously and the resolution was to disable merging fields from fragment spreads. However, the output of apollo-cli 0.2.0 doesn't change when we use the
--mergeInFieldsFromFragmentSpreadsflag.Here is a small sample query that can be used to illustrate the issue:
Generating using apollo-cli v0.6.0 with and without
--mergeInFieldsFromFragmentSpreadsproduced the following output:API.swift.txt
Here is the expected output, generated with apollo-codegen v0.17:
API.swift.txt