graphql fragments



~1 min read


173 words

Recently, I listened to a conversation on the Modern Web Podcast about GraphQL in 2019

When it comes to understanding GraphQL, several of the panelists referenced the talk Lee Byron gave at Full Stack Fest 2016 on Immutable User Interfaces.

The talk is a great primer on why we have GraphQL and how it solves some of the problems inherent with MVC/REST - particularly around latency.

The best part for me, however, was around colocated data dependencies (~18 minute mark) - in particular the use of fragments to define collections of data that are often required together and help to address overfetching.

An example from Lee’s slides:

  event(id: 1234) {

fragment attendeeList on Event {
  attendees {

fragment personRow on User {

fragment profilePic on User {
  profilePicture {

Plenty more to learn about how to best use Fragments, but at least I now know they exist!


Hi there and thanks for reading! My name's Stephen. I live in Chicago with my wife, Kate, and dog, Finn. Want more? See about and get in touch!