Precision
Ask for what you need, get exactly thatSend a GraphQL query to your API and get precisely the data you request — no over-fetching, no under-fetching. Predictable responses keep apps efficient and performant.
Deliver high-performance user experience at scale
Secure and stabilize your API with a strongly typed schema and validated queries
Reduce dependencies through efficient, distributed development
Facebook's mobile apps have been powered by GraphQL since 2012. A GraphQL spec was open-sourced in 2015. Now it is used by industry-leading companies worldwide and supported by the GraphQL Foundation, hosted since 2018 by the non-profit Linux Foundation.
type Project {
name: String
tagline: String
contributors: [User]
}
{
project(name: "GraphQL") {
tagline
}
}
{
"project": {
"tagline": "A query language for APIs"
}
}
Deliver high-performing user experiences at scale. The world’s leading apps use GraphQL to create faster, more responsive digital experiences.
Protect your APIs while maintaining full visibility into data consumption. GraphQL allows you to monitor, secure, and optimize API usage while ensuring compliance.
Let your teams ship faster with GraphQL’s flexible, decoupled architecture. GraphQL allows frontend and backend teams to work independently and efficiently.
GraphQL is unapologetically built for front-end engineers, aligning with their way of thinking, how views are structured and how data is consumed.
Most product development involves the creation and manipulation of view hierarchies. GraphQL queries mirror UI structures, ensuring a natural way to request data that matches the shape of the response.
Every GraphQL service defines a type system, enabling tools to syntactically validate queries before execution and ensuring predictable responses.
A GraphQL service publishes the capabilities that its clients are allowed to consume. It is the client who control the data they receive, requesting only what they need at a field level, unlike traditional fixed endpoints.
GraphQL APIs can describe themselves, allowing tools and clients to query the schema for available types and capabilities. It serves as a powerful platform for building common tools and client software libraries.
GraphQL is an ecosystem shaped by thousands of collaborating developers and companies around the world. From solo contributors to full-time maintainers, the GraphQL community builds libraries, runs meetups, funds innovation and helps move the technology forward.
Send a GraphQL query to your API and get precisely the data you request — no over-fetching, no under-fetching. Predictable responses keep apps efficient and performant.
GraphQL seamlessly follows relationships between data, eliminating multiple API calls. While typical REST APIs require loading from multiple URLs, GraphQL APIs get all the data your app needs in a single request. Ideal for complex queries and optimizing network performance.
Know exactly what you can request without leaving editor. Highlight potential issues before sending a query and take advantage of improved code intelligence. GraphQL makes it easy to build powerful tools. And many of them, like GraphiQL, are open source and built by the GraphQL community.
GraphQL APIs are structured around types and fields, not endpoints. This ensures data consistency, self-documentation, and clear, actionable errors. Apps can use types to avoid writing manual parsing code.
Add new fields and types without impacting existing queries. Deprecate outdated fields while keeping APIs clean and future-proof. By using a single evolving version, GraphQL APIs give apps continuous access to new features and encourage more maintainable server code.
GraphQL is storage-agnostic — integrate databases, REST APIs, and third-party services into a single, cohesive data layer. Write GraphQL APIs that leverage your existing data and code with GraphQL engines available in many languages.
GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL 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, makes it easier to evolve APIs over time, and enables powerful developer tools.
GraphQL queries access not just the properties of one resource but also smoothly follow references between them. While typical REST APIs require loading from multiple URLs, GraphQL APIs get all the data your app needs in a single request. Apps using GraphQL can be quick even on slow mobile network connections.
GraphQL creates a uniform API across your entire application without being limited by a specific storage engine. Write GraphQL APIs that leverage your existing data and code with GraphQL engines available in many languages. You provide functions for each field in the type system, and GraphQL calls them with optimal concurrency.
type Character {
name: String
homeWorld: Planet
friends: [Character]
}
// type Character {
class Character {
// name: String
getName() {
return this._name
}
// homeWorld: Planet
getHomeWorld() {
return fetchHomeworld(this._homeworldID)
}
// friends: [Character]
getFriends() {
return this._friendIDs.map(fetchCharacter)
}
}
# type Character {
class Character:
# name: String
def name(self):
return self._name
# homeWorld: Planet
def homeWorld(self):
return fetchHomeworld(self._homeworldID)
# friends: [Character]
def friends(self):
return map(fetchCharacter, self._friendIDs)
// type Character {
public class Character {
// name: String
public String Name { get; }
// homeWorld: Planet
public async Task<Planet> GetHomeWorldAsync() {
return await FetchHomeworldAsync(_HomeworldID);
}
// friends: [Character]
public async IEnumerable<Task<Character>> GetFriendsAsync() {
return _FriendIDs.Select(FetchCharacterAsync);
}
}
type Character {
name: String
homeWorld: Planet
friends: [Character]
}
// type Character {
class Character {
// name: String
getName() {
return this._name
}
// homeWorld: Planet
getHomeWorld() {
return fetchHomeworld(this._homeworldID)
}
// friends: [Character]
getFriends() {
return this._friendIDs.map(fetchCharacter)
}
}
# type Character {
class Character:
# name: String
def name(self):
return self._name
# homeWorld: Planet
def homeWorld(self):
return fetchHomeworld(self._homeworldID)
# friends: [Character]
def friends(self):
return map(fetchCharacter, self._friendIDs)
// type Character {
public class Character {
// name: String
public String Name { get; }
// homeWorld: Planet
public async Task<Planet> GetHomeWorldAsync() {
return await FetchHomeworldAsync(_HomeworldID);
}
// friends: [Character]
public async IEnumerable<Task<Character>> GetFriendsAsync() {
return _FriendIDs.Select(FetchCharacterAsync);
}
}