~/talk

Optimistic UI updates with Apollo Client and React

Talkat GraphQL Summit 2023 · 2023-10-09..10-13· [react, frontend-architecture]
slides:none on file

Shows a React + Apollo Client front end with Apollo Server and Node implementing optimistic UI for full CRUD and drag‑and‑drop reordering. Implements cache update functions and the optimisticResponse option, uses temporary ID and __typename fields for creates, adds a custom merge function to resolve array conflicts, and disables update/delete buttons until server responses arrive. Also covers nested types by adding an author object and a displayOrder integer for DnD. Demo runs instantly on slow 3G and then reconciles with server state.

AI-written summary · about

  1. 0:00Problem
  2. 2:24Main Question
  3. 4:12What are Optimistic UI Updates
  4. 5:50Optimistic Response
  5. 6:58Create Mutation
  6. 11:12Delete Mutation
  7. 12:56Custom Merge Function
  8. 15:57Fix Error
  9. 17:50Complex Use Cases
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.