GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. It provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more.
- Schema Definition Language (SDL): Types, fields, inputs, and scalars.
- Operations:
Query: Reading data (exact field selection).Mutation: Writing/modifying data.Subscription: Real-time updates via WebSockets.
- Resolvers: Functions on the server that fetch the data for a particular field.
- Performance: Over-fetching vs under-fetching, N+1 query problem, dataloader patterns.