@Defer All the Slow Things
summary
A proposed @defer directive lets a GraphQL client mark fragments as low priority so fast fields arrive first and slow fields stream later; Apollo Client adds an Accept: multipart/mixed header and parses the response stream using the boundary from the RFC to emit an initial JSON chunk (regions show up immediately in the demo) followed by a final chunk with next:false. The proposal is at stage two, Apollo Router supports an experimental defer flag, and the feature works end-to-end in the Pokemon demo.
AI-written summary · about
chapters (7)
- 0:00Introduction to defer
- 0:37History and context
- 1:48The elevator pitch
- 3:13Solving query delays
- 5:25Under the hood
- 8:10How data delivery works
- 10:33Future outlook and closing
related talks
25mQuery Now, Render Later: Leveraging @defer for Efficient Data Delivery
21mStreaming HTTP and GraphQL
32mLower Latency With Streaming GraphQL
35mState of @Defer and @Stream
25mWhat's next for GraphQL?
12mImprove Application Performance and User Engagement with Advanced GraphQL Features
32mGraphQL Future
24mModern Apollo Client React
