GraphQL is a query language for APIs that fulfills queries with existing data. It describes the data within the API and provides developers with tools from there. GraphQL is organized through types and fields rather than endpoints to ensure apps can avoid writing manual parsing codes. The technology allows a developer to learn what data can be requested and highlight issues from the API without an editor.
Key features of GraphQL include the following:
- Aggregating data from multiple UI components
- Creating a representation of data that feels natural (i.e., a graph)
- Ensuring data is statically typed and that these types inform the queries supported by the schema
- Reducing the need for breaking changes while utilizing a built-in mechanism for deprecations when needed
- Accessing a tooling ecosystem with GUIs, editor integrations, code generation, linting, analytics, and more
GraphQL was created in 2012 by Facebook (now Meta), and the company's mobile apps have been powered by GraphQL since its creation. A GraphQL spec was open-sourced in 2015. In 2019, Facebook and others created the GraphQL Foundation—a neutral, nonprofit home for GraphQL. GraphQL has grown to be used by a large number of companies and teams of various sizes across different environments and languages in order to run mobile apps, websites, and APIs.
- Schema—the type system used to define the API for a server implementation, including all of its capabilities and functions.
- Query—the request, or instruction, for an output. New queries are declared with a keyword and can support nested fields, arrays, and arguments.
- Resolver—a function that specifies how and where an API can access data within a given field. The resolver tells GraphQL how to handle queries.
The GraphQL Foundation is a neutral, nonprofit foundation founded in 2019 by Apollo, AWS, Butterfly Network, Dgraph Labs, Facebook, Gatsby, GraphZen, Hasura, IBM, Intuit, Neo4j, Novvum, Pipefy, Salsify, Solo.io, and Thicit. The foundation is hosted by The Linux Foundation and acts as a home for GraphQL assets and collaboration, including the GraphQL trademark. It provides a means of collecting and distributing membership dues to support core community infrastructure and programs. The GraphQL foundation also encourages contributions, stewardship, and a shared investment from a broad group in vendor-neutral events, documentation, tools, and support. The primary aim is to guarantee the GraphQL community is able to focus on the evolution of the specification and reference implementations. This is done through a number of activities:
- Funding grants for project maintainers and community gardeners
- Coordinating and funding mentorship programs
- Providing collaboration infrastructure
- Managing the GraphQL trademark and related policies
- Providing legal support for projects
- Operational and logistical support through The Linux Foundation
The GraphQL Foundation works closely with the GraphQL Working Group and the GraphQL Technical Steering Committee (TSC).