REST vs GraphQL
summary
Quick comparison of concrete behavior and tradeoffs: REST exposes many URL endpoints and common verbs (GET/POST/PATCH/DELETE) while GraphQL uses a single /graphql endpoint and only POST requests with queries and mutations; GraphQL enforces a schema/type system that prevents over- and under-fetching and lets one request pull tomatoes cheese and dough that REST would need three endpoints to gather; demos use a simple pizza server and JSON responses to show queries, mutations, and how schema introspection aids frontend/backend coordination.
AI-written summary · about
