Problem
lesson.loadLessonMetadataFromGraphQL.graphql is a top latency/error hotspot in structured logs:
- avg: ~836ms
- p95: ~2069ms
- errors: 476 (last ~24h)
lesson.loadLesson.summary ends up at ~1231ms avg / ~2783ms p95 partly due to this dependency.
Goal
Harden the GraphQL leg so lesson pages degrade gracefully and avoid retry/refetch cascades.
Proposed work
- Add timeout + bounded retry for lesson metadata GraphQL fetch.
- Add explicit fallback behavior when metadata fetch fails (serve known-safe minimal lesson data).
- Emit structured outcome fields (
status, timed_out, fallback_used, error_class).
- Ensure client does not trigger duplicate recovery fetches when SSR already returned fallback data.
Acceptance
- GraphQL metadata error rate reduced materially (target: >50% drop).
- p95 for
lesson.loadLesson.summary improves.
- Fallback path is observable in Axiom and does not break playback/auth gating.
Problem
lesson.loadLessonMetadataFromGraphQL.graphqlis a top latency/error hotspot in structured logs:lesson.loadLesson.summaryends up at ~1231ms avg / ~2783ms p95 partly due to this dependency.Goal
Harden the GraphQL leg so lesson pages degrade gracefully and avoid retry/refetch cascades.
Proposed work
status,timed_out,fallback_used,error_class).Acceptance
lesson.loadLesson.summaryimproves.