Essential session storage is required to sign in. Optional analytics remain off unless you allow them.
Build a GraphQL server over a real database (Postgres/SQLite via an ORM). Implement resolvers with a per-request CONTEXT, and FIX the N+1 problem with DataLoader (batch + cache the child lookups in one tick). Add CURSOR-based (Relay connection: edges/node/cursor + pageInfo) pagination to a list field, validate mutation inputs, and surface domain errors via the GraphQL errors array (knowing the HTTP status is typically 200). Demonstrate, with query logs, that a list-of-N query makes O(1)/batched DB calls, not N+1.
DataLoader batches child lookups per request; query logs show batched (not N+1) DB calls for a list query.
A cursor/Relay-connection paginated field (edges/node/cursor + pageInfo) that is stable across inserts.
Resolvers use a per-request context; DataLoaders created per request, not globally.
Input validated; domain errors returned in the errors array with partial data where appropriate.
Use this README structure to make the work reviewable.
DevPath fetches a read-only, size-capped snapshot. Submitted code is never executed.
# A GraphQL API with DataLoader & cursor pagination ## Goal Build a GraphQL server over a real database (Postgres/SQLite via an ORM). Implement resolvers with a per-request CONTEXT, and FIX the N+1 problem with DataLoader (batch + cache the child lookups in one tick). Add CURSOR-based (Relay connection: edges/node/cursor + pageInfo) pagination to a list field, validate mutation inputs, and surface domain errors via the GraphQL errors array (knowing the HTTP status is typically 200). Demonstrate, with query logs, that a list-of-N query makes O(1)/batched DB calls, not N+1. ## Acceptance criteria - [ ] N+1 / DataLoader: DataLoader batches child lookups per request; query logs show batched (not N+1) DB calls for a list query. - [ ] Pagination: A cursor/Relay-connection paginated field (edges/node/cursor + pageInfo) that is stable across inserts. - [ ] Resolvers & context: Resolvers use a per-request context; DataLoaders created per request, not globally. - [ ] Errors & validation: Input validated; domain errors returned in the errors array with partial data where appropriate. ## Verification - [ ] Document installation and run commands. - [ ] Record automated checks and their exact commands. - [ ] Add representative output, screenshots, or a short demo where useful. - [ ] Confirm failure paths and known constraints. ## Decision log ### Decision title - Context: - Choice: - Alternatives considered: - Tradeoffs: ## Evidence - Link each rubric criterion to the file, test, or artifact that demonstrates it. ## Known limitations - List what is intentionally out of scope and what should be improved next.