GraphQL 00:00:01 Ask for one profile, follow three sources A reader opens a profile containing the user's name, posts and reward points. A GraphQL operation describes those fields. One client request can still fan out to several independent backend services. POST /graphql with the query and its variables. The gateway checks the token. Is the text valid, do the fields exist, do the types fit, is it within the limits? No data has been touched yet. User and posts go through loaders, which ask the database in batches. Points come from another service. The client does not know or care. The answer has the three things asked for, nested as in the query. A resolver supplies a field's value. The schema defines the shape callers may request, while the implementation determines the network trips, authorization and cost of assembling it. 00:00:51 Three posts refer to two authors The first database query returns a list of posts. A naive author resolver issues a second request for each post. Follow the author identifiers and notice that two posts belong to the same person. Both ways begin with one query for the posts. The author resolver asks for user 1. The next resolver asks for user 2. And for user 1 again. The loader already has that key. Users 1 and 2 in one query, then each post gets its own author. A request-scoped loader can batch distinct authors and map results back to the original positions. Scope the cache to prevent data authorized for one caller from being reused for another. 00:01:29 Price a nested list before executing it A public API allows callers to select nested lists. Depth alone misses an important factor: multiplying list sizes can turn a shallow-looking request into a large amount of resolver work. With fifty repositories and at most ten issues each, the example selects up to fifty repositories plus five hundred issues. Within the limit. Points are taken from this client's budget. Three nested lists of size one hundred can yield one hundred first-level nodes, ten thousand next-level nodes and one million leaves in this upper-bound exercise. No resolver ran and the database saw nothing. The client gets an error with the cost. Estimate cost using bounded list arguments and field-specific prices, then enforce the policy before expensive work. Observe actual resolver costs so estimates improve. 00:02:18 Reuse a public persisted operation The app often asks for the same public catalog view. A persisted-query scheme can identify a known query by its hash, leaving variables to describe this particular request. The client sends only the SHA-256 hash and the variables with GET. The server asked for the text. It stores hash and query in Redis and answers. Another client sends the same hash with GET. The answer is public with max-age 60, so the CDN keeps it. During the configured freshness window an eligible identical public request can be served from the CDN. A known hash says which operation to run. It does not make a user-specific result safe to share. Build cache keys and response policies around the actual audience and variables. 00:03:01 A points outage need not erase a name The rewards service becomes unavailable. GraphQL distinguishes fields allowed to be null from fields required to supply a value. That schema choice determines how far the error propagates. The points service does not answer. User and posts are fine. For a non-null points field, a null result propagates upward until a nullable parent can absorb it. The example loses the enclosing user object. A nullable points field can instead be null with a corresponding error path while sibling fields remain available. The status was 200. An alert on errors by operation name shows the failure. Track operation-level errors and their paths in addition to HTTP status. The API can return partial data and a useful explanation of which field failed.