---
id: w8/m3/t002
title: Apollo wiring for the usage query + dev-stub data
worker: worker8
status: done
estimate: 30m
depends_on: [w8/m3/t001]
---

## Objective

Wire the dashboard to m2's GraphQL `usage` query: the Apollo query/hook plus dev-stub support so the page renders realistic data in local dev — coordinated with w5/m10's trustworthy-stub work so the stub returns per-service usage, not one hardcoded blob.

## Context

- Read `dashboard/CLAUDE.md` before editing (repo rule).
- Query pattern: follow the existing metrics/`monthToDateBandwidth` client wiring.
- If w5/m10 has landed, extend its multi-service stub; if not, add stub data compatible with its direction (per-service keyed, no phantom-service echo).

## Steps

1. Add the GraphQL document + generated types/hook per the dashboard's codegen setup.
2. Extend the dev stub with per-service usage fixtures.
3. Verify the hook returns stub data locally and real data against a cluster with m2 deployed.

## Files

- `dashboard/` (query documents, stub server data)

## Acceptance criteria

- [ ] Hook delivers usage data in both stub and real modes; stub is per-service (no phantom echo).

## Out of scope

- The page UI (t003).
