apollo-ios: Apollo client 1.2.0 version pod update gives multiple error
Summary
Hi Team,
In your current project, I have updated the Apollo Client version from 0.53.0 to 1.2.0. However, after the update, I encounter multiple errors(2599 errors) in the generated model classes. I am currently using Xcode 14.3.1 and Swift 5.
please suggest me how to solve this issues.
Version
1.2.0
Steps to reproduce the behavior
pod 'Apollo', '1.2.0'
./Pods/Apollo/apollo-ios-cli init --schema-name Schema --module-type embeddedInTarget --target-name ApolloClientiOS
{
"schemaName": "MyQuery",
"options": {
"cocoapodsCompatibleImportStatements": true
},
"input": {
"operationSearchPaths": [
"**/*.graphql"
],
"schemaSearchPaths": [
"/Users/vignesh.arunagiri/Documents/XCode/ClientiOS/Schema/schema.json"
]
},
"output": {
"testMocks": {
"none": {}
},
"schemaTypes": {
"path": "./MyQuery",
"moduleType": {
"embeddedInTarget": {
"name": "ClientiOS"
}
}
},
"operations": {
"inSchemaModule": {}
}
}
}
./Pods/Apollo/apollo-ios-cli generate
Logs
No response
Anything else?
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18 (8 by maintainers)
@ArunVicky001 all these details are covered in the migration guides. I recommend reading the migration guide for
1.0
first and then the later versions if you’re going directly to1.3
.The previous Apollo versions used double optionals (
??
) to representnull
vsnil
input values. This was unclear to most users, complicates reading and understanding the code in many situations and we found that it led to unintentional errors.GraphQLNullable
is the new way in 1.0 to provide a clear, albeit more verbose, type to work with nullability in GraphQL.@ArunVicky001 There is a post over on our community forums that talks more about this and links out to the docs for
GraphQLNullable