Wow, thank you so much! That alone was more praise than I’d expected coming my way.
I firmly believe that Apollo does many things right, and most of the time developing with it is a real joy - but the road to get to that point was so rocky and painful that it took me several years of very gradually gaining a better understanding of cache manipulation.
apollo-augmented-hooks is actually my second package for solving these issues (but the first one I open-sourced), and the first one is completely deprecated now and will never be made public, because while it mostly did the job for Apollo 2, I’d made some fundamentally wrong decisions building it based on an incomplete understanding of Apollo’s interna, and those bit me in the rearside when our application grew sufficiently large. With
apollo-augmented-hooks, I feel confident that I went in the right direction this time. We’ve migrated about 75% of our application from the old package to the new one, and it’s a joy to behold how little actual cache modification code is needed to keep the application state up to date. It has become a lot more maintainable.
The issue is that the beauty and simplicity is still lost on someone who has an incomplete grasp of Apollo’s cache. My colleagues who were less experienced with Apollo still had trouble writing proper cache updates before I trained them or before I had written the caching guide. No matter how potentially easy it is to manipulate the cache, you’re required to internalize a lot of fundamentals before you can be efficient. That’s a shame, but I guess it’s the nature of cache invalidation and not something I can solve.
Thanks again for your kind words, and I’m thrilled that you’re planning to integrate/reference my package in Redwood!
As for my future plans:
apollo-augmented-hooks has been developed primarily with our internal use cases in mind, but it is generic enough that any Apollo 3 user could benefit from it. That said, I’m looking forward to feedback from adopters, so I can learn if there are things that I’ve overlooked and fix them. For the time being, the package is feature-complete, but if I stumble across more ways to improve DX or add sensible performance features, I’ll happily do that. One thing I can imagine spending more time on down the road is pagination - the package already includes something to make pagination easier, but it is very opinionated and depends on a certain way for the server to be implemented, which is why I’ve marked it as experimental in the readme. If you can think of any suggestions, let me hear them!