What is GraphQL? Better APIs by design

Learn how Facebook’s open standard for querying data can provide a better way to build APIs than REST and Swagger

What is GraphQL? Better APIs by design
thinkstock

When most of us think of web APIs, we think of REST (Representational State Transfer). You send a request to a request-specific URL, and you receive the results as HTML, XML, JSON, plain text, PDF, JPEG... whatever format makes sense for the application. 

Facebook’s web API system, GraphQL, provides a new way to define APIs. Developers use a strongly typed query language to define both the requests and the responses, allowing an application to specify exactly what data it needs from an API. Thus GraphQL is meant to provide a more efficient, structured, and systematic alternative to REST.