The Path to Generic Endpoints using Shapeless
summary
Goal is a single generic update endpoint for Guardian content atoms so field-level edits avoid overwrite conflicts; building hundreds of endpoints is untenable and new atoms cost ~2 months each. Experiment uses Shapeless to convert nested case classes to HLists and then to nested maps via a toMapRec type class and a reverse fromMap conversion, producing a working PR that lacks type safety, then gets replaced by an implementation in Circe for the Atom Workshop and completes in about an hour.
AI-written summary · about
chapters (9)
- 0:00Intro
- 1:08Content Atoms
- 2:14Atom Workshop
- 4:56Shapeless
- 6:17First approach
- 8:12Second approach
- 9:27Type Classes
- 11:11Class to map
- 13:24Map to class
related talks
54mRoll Your Own Shapeless
45mResidential Programming without Mutable State
16mModule Shapes for Modern Tooling
45mFree Your Monads and the Rest Will Follow
26mIncrementally Adopting GraphQL. The Holy Grail?
23mGraphQL in real life
16mKeeping Your Stack Fresh with AOT
10mKeynote: Creating a Golden Path for GraphQL
