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.

Screenshot 2023-07-06 at 10 40 20 PM

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)

Most upvoted comments

@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 to 1.3.

GraphQLNullable older version it was not there why it’s introduced in the newer version?

The previous Apollo versions used double optionals (??) to represent null vs nil 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