## Goal The frontend currently filters `frontend/src/mocks/recipes.ts` in the browser. Wire it up to the real GraphQL backend (now live on the VM, #14) instead, so search, filtering, sorting and paging run server-side over the whole dataset, as the assignment requires — and pick the GraphQL client/state management library that's still an open decision (CLAUDE.md "Still open"). ## Acceptance criteria - [ ] Pick a GraphQL client (e.g. Apollo Client, urql, graphql-request + a state library) and record the decision in CLAUDE.md and README - [ ] Add it as a frontend dependency, pointed at the backend over an env-based URL: `http://localhost:3001` in dev, `/project2/graphql` in the production build (proxied by Apache, see `deploy/apache/project2.conf`) - [ ] HomePage's search box, `RecipeFilter` and sort drive the `recipes` query's `search`, `filter`, `sort`, `limit`/`offset` arguments — no client-side filtering of mock data left on the result list - [ ] Pagination / "load more" uses the server's `totalCount` and `hasMore`, not just what's currently loaded in the browser - [ ] `RecipeDetailPage` fetches one recipe via the `recipe(id)` query instead of reading it out of mock data - [ ] Loading and error states: a visible loading indicator while a query is in flight, and a visible message (not a blank page) if a query fails - [ ] The `aria-live` result-count announcement reads the server's `totalCount` - [ ] `frontend/src/mocks/recipes.ts` and the client-side filtering in `frontend/src/utils/recipeFilters.ts` are removed once nothing depends on them, or kept only for tests with a comment saying so - [ ] Component tests updated to mock the GraphQL client/network layer instead of importing mock data directly - [ ] README "Current status" paragraph updated: frontend is connected to the API, not mock data ## Notes Backend schema (`backend/src/schema.ts`) already supports everything needed — no backend changes expected: `recipes(search, filter, sort, limit, offset)` with `RecipeFilter { categories, maxCalories, minRating }`, `RecipeSort` (RELEVANCE/RATING/CALORIES/TITLE), `recipe(id)`, and `categories`. Builds on #16 (closed), which shipped the UI against mock data; the live backend from #14 answers at `/project2/graphql` in production.