The core user-generated content. - [ ] `upsertReview(input: UpsertReviewInput!)` - max one per user per album - [ ] `deleteReview(id: ID!)` - [ ] star rating as a **radio group** so it is keyboard- and screen-reader-operable - [ ] inline error if saving fails; `role="alert"` **Acceptance:** a saved review survives a reload and appears attributed to the right display name. ## The mutation signature is already fixed by the schema Earlier drafts of this issue listed `upsertReview(albumId, rating, text, userId, displayName)`. Do not build that. `schema.graphql` has: ```graphql input UpsertReviewInput { albumId: ID! rating: Int! comment: String! } ``` There is no `userId` and no `displayName` in the input, and the text field is `comment`. Identity comes from the `X-User-Id` header on every request and is read into the per-request GraphQL context, so no field in the schema takes a `userId` argument. `displayName` is derived server-side from the UUID when the user row is created. That is the contract from #10 and both halves of it matter. `deleteReview` takes the review id, not the album id. A user can only delete their own, so the resolver checks the review's owner against the header. ## One thing the acceptance line cannot promise "Attributed to the right display name" holds in the normal case, but `displayName` is not an identity guarantee. Any client can send any UUID and write as that user, which is what robertky caught on #10. The name is derived server-side, so it stops a client choosing an arbitrary label, and nothing more. Worth knowing when someone asks how strong this is. There is no authentication in this project and that is a deliberate scope decision, not an oversight. The database half is already in place: `review` exists with a `review_album_user_unique` index enforcing one review per user per album, and a trigger keeps `updated_at` current. ## Do not also write the average rating #12 adds `album.average_rating` maintained by a trigger on `review`. So a review write updates the rating without the resolver touching it. Writing `average_rating` in `upsertReview` or `deleteReview` as well would race the trigger and can leave the two disagreeing. Same reason `search_vector` is not written by the seed script any more: the trigger owns it. If the trigger turns out to be the wrong place for the rating, that is #12's call to make, not this issue's.