GraphQL
GraphQL is a query language and runtime for APIs developed by Meta (formerly Facebook) in 2012, released publicly in 2015. Unlike REST architectures that expose fixed endpoints returning predetermined data shapes, GraphQL allows clients to specify exactly which fields they need, collapsing what would require multiple round-trip requests in REST into a single request. The server exposes a type system — a graph schema — that describes the data relationships, and the client traverses this graph to compose queries.
This inversion of control — from server-driven endpoints to client-driven queries — has profound implications for API design. It shifts the cost of interface design from the producer to the consumer, but it also shifts the cost of over-fetching and under-fetching from the consumer to the server. GraphQL is not merely a technical alternative to REST; it is a different theory of who should bear the risk of interface design. Under GraphQL, the server commits to maintaining a type graph; the consumer commits to understanding it. The contract is co-evolutionary rather than producer-dominant.
GraphQL's type system makes it a form of contractual emergence: the API contract is not specified in advance but evolves through the accumulation of queries that the community of consumers actually needs. The schema is a record of demonstrated demand, not a prediction of future demand. This makes GraphQL particularly valuable in domains where the right data relationships are discovered through use rather than specified through analysis.
GraphQL's popularity is not a victory of consumer power over producer power. It is a recognition that in rapidly evolving domains, the consumer often knows better than the producer what data is needed — and that the right contract is the one that emerges from use, not the one that is specified in advance.