πŸ•ΈοΈ GraphQL

Checklist

  • Schema-first design: types, queries, mutations, subscriptions, input types, enums, interfaces/unions
  • Resolvers and the execution model
  • N+1 problem β†’ DataLoader (batching + caching per request) ⭐
  • Pagination (Relay connection spec / cursors)
  • Errors (partial results), nullability design
  • Security: query depth/complexity limits, persisted queries, authz in resolvers (field level)
  • Caching challenges (POST, no HTTP cache) and solutions (persisted queries + GET, client caches)
  • Federation (Apollo Federation / GraphQL Fusion) for microservices: awareness
  • When NOT to use GraphQL

Implementations

  • Java: Spring for GraphQL (@SchemaMapping, @BatchMapping)
  • Go: gqlgen

πŸ§ͺ Labs (🟒 warm-up β†’ 🟑 core β†’ πŸ”΄ hard β†’ ⚫ boss)

  • 🟑 Spring for GraphQL: workflows β†’ versions β†’ runs β†’ steps with @BatchMapping
  • πŸ”΄ Query depth/complexity limits + persisted queries
  • ⚫ Subscriptions for run status vs SSE; compare them

🧠 Cognitive tasks

  • Predict the number of SQL queries for a nested query with and without DataLoader

πŸ›°οΈ Orbit integration

  • The orbit-web UI data layer

Go deeper

Resources

  • graphql.org/learn Β· Production Ready GraphQL (Giroux) Β· Spring for GraphQL docs