Do this before you use Apollo Client
Apollo Client has been a crucial part of CodePen’s frontend code from the moment we started using a GraphQL API on the backend. Before we had Apollo Client we had to handle the caching of state an request management ourselves. That was a lot of code to write.
The one thing I’ll say though is to make sure you really understand what how cache normalization works before you use this tool. I thought I got it, but I didn’t reallllly get it before I started building with it and it created a lot of confusion and heartache. When I got my head around the mental model of Objects and References in the cache, things fell in to place.
I would recommend reading these until you understand:
You might be thinking “is she suggesting I read the docs? duh”. I’m writing this for people like me who like to get their hands dirty before they RTFM. Apollo Client is not the time for that.
Thanks for reading! If you'd like to share your thoughts you can leave a comment, send me an email, Tweet at me, or add an issue on GitHub.
Comments
The Comments system is powered by a third party service - Talkyard. Sometimes they don't load 😞. If you're having trouble leaving a comment you can send me an email.