Closed PSinha1202 closed 2 weeks ago
Hi @PSinha1202. Can you confirm that you have re-run the code generation with the latest version? This fix changes the generated models to remove the warning.
ahh I see, let me try that and confirm @AnthonyMDev
ok so tried the re-run code gen and I get into this error
Error: typeMismatch(ApolloCodegenLib.ApolloCodegenConfiguration.SelectionSetInitializers, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "options", intValue: nil), CodingKeys(stringValue: "selectionSetInitializers", intValue: nil)], debugDescription: "Unrecognized key found: localCacheMutations", underlyingError: nil)) Finished fetch + codegen
I tried deleting all models to re-run code gen but still seeing the above issue.
Oh, that's not great, but easy to fix. We removed the localCacheMutations
config option for selectionSetInitializers
. Because we are now just always generating initializers for local cache mutations. The default value had that included, so your config file is going to have that line included.
We should get a patch out that handles this situation gracefully but for now, you can remove that line from your codegen config JSON file and it should work.
Sure will try, but as of now I have downgraded to 1.14.1 and re-ran the codegen and it seems to fix my original issue and I am able to compile my code. Will check the 1.15.0 or later version in couple of days.
Sounds good. This should be resolved. If you are still having issues, let us know and we can re-open the issue.
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.
Summary
There seems to be related bug #3398 which was resolved before but when today when I run the Apollo tag 1.15.0 with Xcode 16 beta and swift 5, fragment annotated with @apollo_client_ios_localCacheMutation directive causes compile time error
Setter for
Can I get a confirmation if the issue still persist?
Version
1.15.0
Steps to reproduce the behavior
update Apollo to latest 1.15.0 Xcode 16 beta with swift 5 compile our codebase and found two errors and both related to same fragment those are annotated with @apollo_client_ios_localCacheMutation
Logs
No response
Anything else?
No response