💻 Development + 🌐 Web Technologies intermediate

GraphQL

Query language for APIs that lets clients request exactly the data they need, developed by Facebook.

GraphQL provides an alternative to REST where clients specify their data requirements in queries. Key advantages: no over-fetching (get only requested fields), no under-fetching (get related data in one request), strongly typed schema, and introspection (self-documenting). Core concepts: queries (read data), mutations (write data), subscriptions (real-time updates), and resolvers (functions that fetch data). The schema defines available types and operations. Tools like Apollo and Relay simplify implementation. GraphQL excels for complex data relationships and mobile apps needing bandwidth efficiency. Trade-offs include caching complexity and potential for expensive queries.