Engrain by ByteRush

WEB.15.02 Mid-level

GraphQL fundamentals and trade-offs + Other API styles (awareness)

Comes up in: Frontend system design, Recruiter screen

This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.

What it covers

  • schema, queries, mutations, subscriptions
  • over/under-fetching
  • normalized client caches (Apollo, Relay, urql)
  • N+1 and DataLoader
  • persisted queries
  • caching difficulty over HTTP
  • when REST is better
  • gRPC and gRPC-Web
  • tRPC
  • OpenAPI-generated clients
  • JSON:API
  • webhooks

Words you will know

GraphQL schemaresolvernormalized cachepersisted queryRPCOpenAPIwebhook

What you will practise

  • compare REST vs GraphQL for one screen
  • decide an API style for 3 scenarios

Interview questions this answers

  • REST vs GraphQL: when would you choose each?
  • What is the N+1 problem in GraphQL?