Quiz
Eight quick questions on GraphQL schemas, fragments, mutations, and subscriptions.
Sample questions
EXAMPLE
# GraphQL quiz 1) Which type marker means 'this field will never be null'? a) ? b) ! c) + d) :nullable(false) 2) Connection-style pagination uses: a) page/limit b) offset c) edges + cursors + pageInfo d) since/until 3) Fragments help you: a) version the schema b) reuse field selections across queries c) hide deprecated fields d) escape sensitive data 4) Mutations should be: a) free-form b) named, ideally one logical action per mutation c) batched by the server d) only on POST 5) Top-level errors in the response are for: a) every domain error b) execution failures (parse, validation, resolver throw) - use payload UserError types for domain errors c) auth only d) never used 6) Persisted queries prevent: a) caching b) arbitrary or probing queries by clients c) introspection at runtime d) subscriptions 7) Subscriptions are typically delivered over: a) HTTP polling b) WebSocket (graphql-ws) or SSE c) gRPC d) email 8) Stable IDs in the schema let: a) the server skip auth b) clients dedupe + cache (Relay global IDs) c) prevent N+1 d) skip pagination Answers: 1b, 2c, 3b, 4b, 5b, 6b, 7b, 8b.
Why it matters
Most GraphQL pitfalls are schema design choices that compound. Connections, payload errors, persisted queries, and stable IDs - get those right and the rest is conventional API engineering.
Tip: Tweak the snippet with Try it Yourself », then sit the quiz at the bottom of the page.
Discussion
Loading…