-
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
Exploring Apollo iOS: Feature Parity with Web Client, Cache Updates, and Development Roadmap #3479
Comments
Hi @Vincz 👋🏻
I just replied to you question in that issue. I don't believe there is any documentation specifically about list insertion, no.
I think you're talking about this feature in Apollo Client and here in Apollo Kotlin? Apollo iOS does not have an equivalent feature at the moment. The Apollo iOS cache has a far more limited feature set than the other two libraries.
Another no unfortunately.
You're able to update the same object in the cache by normalizing objects by cache key but that doesn't change the shape of the operation response object. As you noted the generated Swift models are strongly typed to only the fields in the operation/fragment. I think if you wanted to do this you would need to create your own Swift model with all the object's fields and manually fetch that from the cache by id.
Yes, the library is still being actively developed, and our roadmap is public. From your questions it looks like you're mostly interested in cache behaviour which as you can see from the old issues and placement in the roadmap, is not high on the priority list. Version 1.0 was all about achieving stability in code generation and expanding that feature set. Version 2.0 is about Swift 6 compatibility and bringing Swift Concurrency to the library. The cache will be updated in a future major version some time beyond that. |
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. |
Thank you very much for all the clarification @calvincestari! |
Question
I'm a long time user of Apollo Web client and I'm currently trying the IOS client for the first time.
I'm trying to achieve the corresponding features:
Update cache to insert/delete an item in a collection after a mutation (I haven't been able to find documentation about that. It was mentioned here , but it was more than 1 year ago).
Optimistic mutation response to increase responsiveness.
Time base expiration for cache
With the web client, I'm used to query a few fields from an object and a few more later with another query while manipulating the same object. The object simply gets updated with the new fields after it has been requested.
For example:
And my operations would be:
Calling the first operation, then the second would result on an item containing the Id and all 3 fields (the resulting object would be a "merge"). I'm trying to do the same but It doesn't seem possible as the resulted object is strongly typed with only the fields requested from the fragment.
Lastly, I was wondering if the library is still currently being developed or just maintained (It seems that in the past few months, there have only been a few fixes.). If it is, is there some sort of roadmap so we know what the future holds?
I've been able to found these one: #1701 but it seems abandoned and some pending features are almost 8 years old.
Thanks!
The text was updated successfully, but these errors were encountered: