339: Apollo at CodePen

339: Apollo at CodePen

Rachel and Chris chat all things Apollo GraphQL. Apollo is in this weird category of software where like by far most websites do not need it or anything like it. But for CodePen, we consider it nearly essential. The typical sales pitch for GraphQL applies to us for sure (e.g. only ask for the data you need!) but you can add to that the fact that it is empowering for front-end developers, which we have plenty of here on the CodePen Staff. But beyond GraphQL, we need ergonomic ways to write those queries and trust technology to do the right things. For example, 15 components on any given page might need to know the PRO status of a user, and thus be part of that components query, but the network very much does not need to do 15 requests. Apollo does stuff like figuring out what the page needs in aggregate and requesting is and dissemeninating that information as efficiently as possible and caching it. Plus we leverage Apollo for client-only state too, meaning we have a unified system for state management that plays very nicely in our React-based world.

Time Jumps

  • 00:34 Working on Apollo stuff at CodePen
  • 02:48 How do you think of GraphQL and Apollo?
  • 06:52 Dealing with pagination
  • 09:04 Building out the server for GraphQL
  • 13:48 Sponsor: Jetpack Backup
  • 15:28 Apollo pricing
  • 17:41 Apollo Studio and schema
  • 21:18 Why we did this work now
  • 26:34 Manipulating the cache

Sponsor: Jetpack Backup Stand-Alone Plugin

If the only feature of Jetpack you need is the backups, now you can install that as a stand-alone plugin and have a paid plan for that feature alone. Built and hosted on WordPress.com’s secure infrastructure, Jetpack Backup provides peace of mind — you can rest easy knowing that what you’ve built will always be there and can be easily recovered in an emergency.

The post 339: Apollo at CodePen appeared first on CodePen Blog.

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *