I’m attempting to update the version of the Apollo Swift Package in our project from v1.3.0 to v1.4.0 and cannot use the updated cli tool to generate code. I receive the following error trying to generate the Apollo code:
Error: typeMismatch(ApolloCodegenLib.ApolloCodegenConfiguration.FileOutput, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "output", intValue: nil)], debugDescription: "Unrecognized key found: options", underlyingError: nil))
I can reproduce the error with my current setup (v1.3.0) by downloading apollo-ios-cli
from the v1.4.0 release page and running with my current apollo-codegen-config.json
using
apollo-ios-cli generate --ignore-version-mismatch
I’ve looked for documentation on changes to apollo-codegen-config.json
content but the docs still show options
as the valid key.
Here’s my output
dict in apollo-codegen-config.json
:
"output": {
"testMocks": {
"swiftPackage": {
"targetName": "BFFTestMocks"
}
},
"schemaTypes": {
"path": "./BFF",
"moduleType": {
"swiftPackageManager": {}
}
},
"operations": {
"inSchemaModule": {}
},
"options": {
"queryStringLiteralFormat": "multiline",
"deprecatedEnumCases": "include",
"warningsOnDeprecatedUsage": "include",
"conversionStrategies": {
"enumCases": "camelCase"
},
"pruneGeneratedFiles": false,
"selectionSetInitializers" : {
"localCacheMutations" : true,
"namedFragments" : true,
"operations" : true
}
}
}
Is there a change to the “options” key I’m missing that hasn’t been documented?
TIA, Jim