Who’s Up Next is the start of an app for keeping track of whose turn is next. The README sketches the idea in a few lines: a list of people in a set order, grouped into categories such as kids, friends, family and manager, and events ordered by when they were completed, then a short worked example of three people in order, each paired with an event. Its last line is “Who’s up next”.
The code that exists is the server, a GraphQL API with Apollo Server and TypeORM over four entities. It was pushed in a single commit in April 2019 and hasn’t changed since, so the ordering and completion dates from the README never made it into the model, and there’s no client.
The API
- Entities.
Userhas an email and a name.Categoryhas a title, a description and its people.Personhas a name, a description, one category and many events.Eventhas a title, a description and many people, through a join table. The relations are lazy, typed as promises, so TypeORM only loads them when they’re read. - Queries.
users,categories,eventsandpeopleeach return every row, and nested fields like an event’s people or a person’s category resolve straight from the lazy relations. - Mutations.
createUser,createCategory,createEventandcreatePersoneach return a payload with the new record or an error message.

It’s unfinished in a few places. createPerson has no description argument, but the column is required, so creating a person always fails. Passing people to createCategory echoes them back without saving them, because the relation doesn’t cascade. The schema file also still carries comments about books from Apollo Server’s getting-started example.

How it’s built
The server started from the project that typeorm init generates, and its README and package description are still the template’s. It’s TypeScript 2.5 run with ts-node, TypeORM 0.2.16 on PostgreSQL through pg, and Apollo Server 2.4 with graphql 14. createConnection() reads ormconfig.json, which has synchronize turned on, so TypeORM creates the tables from the entities.
Running it today
It still installs with Yarn 1 and starts with Node 10: yarn in the server folder, then npm start. Apollo Server listens on port 4000 and serves GraphQL Playground there, and the server expects a local PostgreSQL database called whos_up_next. For this page, ormconfig.json pointed at a SQLite file instead, with the sqlite3 package added. The categories and events were created through the API, and the sample people and their event links were inserted into the database directly, since the API can’t create them.
The creation date shown here is the GitHub repository’s UTC creation date. The screenshots come from running the server locally with that SQLite change and sample data, and the code card shows a real file from the repository.