-
Notifications
You must be signed in to change notification settings - Fork 734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setter for local cache mutation is unavailable, mutate properties of fragment #3428
Comments
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)) 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 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
' is unavailable: mutate properties of the fragment instead.`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
The text was updated successfully, but these errors were encountered: