Tagged: graphql

Part 1: Fastify Meets GraphQL Yoga
Set up a TypeScript project that runs without a build step, put GraphQL Yoga on a Fastify server and send it your first queries.
Intermediate20 min
Part 2: A Database With PostgreSQL and Drizzle
Start PostgreSQL in Docker, describe the tables of the guild board in TypeScript with Drizzle, create them with a migration and fill them with sample data.
Intermediate25 min
Part 3: Schema First, Typed by Codegen
Write the GraphQL schema of the guild board, let GraphQL Codegen generate the resolver types from it, answer queries from PostgreSQL and find the N+1 problem in the SQL log.
Intermediate25 min
Part 4: Batching With DataLoader
Collect the lookups of a request with DataLoader and answer them with one query per table, so the quest board needs three SQL queries instead of sixteen.
Intermediate25 min
Part 5: Mutations and Live Updates With Subscriptions
Post, accept and complete quests with mutations, push every change to subscribed clients over Server-Sent Events, and keep the DataLoader cache from going stale in long-lived subscriptions.
Intermediate30 min
Part 6: Subscriptions Across Instances With Valkey
Run a second instance of the API, watch its subscribers miss the events of the first, and share the events through Valkey, so every instance hears every change, even after Valkey restarts.
Intermediate20 min
Part 7: Caching Whole Responses in Valkey
Cache complete query results in Valkey with the response cache of Yoga, clear them when mutations change the data, answer repeated GET requests with 304, and keep the API up when the cache is down.
Intermediate25 min
Part 8: Query Limits and Persisted Operations
Protect the API from operations that are too deep or too expensive with a depth limit and a cost limit, and lock it to the operations of your own clients with persisted operations.
Intermediate25 min