GraphQL
Say what the server will do
A document asks for exactly what it needs and the answer arrives in the same shape. What that cost is a different question, and it has an exact answer: a resolver runs once per parent object, so a query four fields long can be eighty-five trips to the database. This is the whole execution model, drilled.
- Modules
- 6
- Drills
- 13
- Build steps
- 1
- Time
- ~4h
Walk out able to
Read a schema and a document you have never seen and say what comes back, what a failure empties, and how many database queries it costs.
What you drill
Schemas and documents
What a type admits, and the rule that refuses a query.
Execution and writes
Where a value lands, where a null lands, write order
The N+1 count
The exact query count, before and after a loader.
Caching and REST
What a client store can answer, and what REST costs.
The pitch
What you practise, and what you leave with
Not an artifact — a reading speed. Thirteen procedures, plus one real schema you wrote against and broke on purpose.
You will practise
- Spelling a document, and what a type admits
- Response shape, null propagation, writes
- Counting resolver calls, batched and not
- Client caching, and REST by the numbers
Afterwards you can
- Say which values a declared type admits
- Trace a failure to the position it empties
- Count the queries a document actually costs
- Decide what a client store can answer
Modules
6 modules, 23 items
Lessons explain one idea. Drills repeat it until it sticks. Build steps make something that exists afterwards.
- 1
Schema, document, syntax
~44 minSay what a declared type admits, write a document, and name what refuses one.
- LessonWhy ask for the shape you want4 min
- LessonRead a field declaration7 min
- DrillSay what the type admits8 min
- LessonRead a document7 min
- DrillWrite it by hand8 min
- DrillName the rule that rejected it10 min
- 2
One resolver per field
~36 minPredict where a value lands, and how far a single failure reaches.
- LessonFollow one field down the tree7 min
- LessonWhen one resolver raises8 min
- DrillPlace the value in the answer9 min
- DrillFind what the null took with it12 min
- 3
Reads, writes and variables
~20 minRun a document of writes in order, and say what each variable became.
- DrillRun the writes in document order11 min
- DrillCoerce the variables9 min
- 4
Count what it costs
~41 minProduce the number a document costs, before and after a loader.
- LessonCount what one query costs9 min
- LessonWhat a loader changes6 min
- DrillCount the resolver calls13 min
- DrillCount them again with a loader13 min
- 5
Caching without URLs
~22 minDecide whether the client can answer without the network, and what a write changed.
- DrillDecide what the store can answer12 min
- DrillSay what the write updated10 min
- 6
Against a resource API
~53 minCount what a document replaces, run one yourself, then diagnose four cold.
- DrillCount the requests it replaces9 min
- DrillCount the fields nobody drew9 min
- Build stepQuery a real schema yourself15 min
- LessonDiagnose two failures cold10 min
- LessonDiagnose two more, cold10 min
More in APIs & services
Keep going
HTTP & APIs
Every answer is already in the headers.
Intermediate~4h6 modules
Auth
Everything works until somebody holds one piece of it.
Intermediate~3h5 modules
REST API Design
Every good decision has a constraint behind it.
Intermediate~3h7 modules
Message Queues
The broker will hand it to you again. How many times?
Advanced~3h5 modules
One request, and a bill nobody counted.
The first item is free. ~4h of focused work, at your own pace.
Advanced~4h6 modules