Frequently Asked Questions

GraphQL Basics & Technical Concepts

What is GraphQL?

GraphQL is a query language for APIs and a runtime for fulfilling those queries with existing data. It allows clients to request exactly the data they need, making data fetching efficient and predictable. Learn more at graphql.org.

How does GraphQL work?

GraphQL works by allowing clients to send queries specifying the exact data they need. The server responds with only that data, avoiding over-fetching and under-fetching. This makes applications fast, stable, and scalable. GraphQL APIs are organized by types and fields, not endpoints.

What are the main differences between GraphQL and REST APIs?

REST APIs use multiple endpoints and return complete datasets, often resulting in over-fetching. GraphQL uses a single endpoint and lets clients specify exactly what data they need, reducing unnecessary data transfer and improving efficiency. For more, see GraphQL vs REST APIs.

Which programming languages support GraphQL servers?

GraphQL servers are available for many languages, including Haskell, JavaScript, Perl, Python, Ruby, Java, C++, C#, Scala, Go, Erlang, PHP, and R. Popular frameworks include Graphene, GraphQL Ruby, PostGraphile, and Mercurius.

What are the top JavaScript GraphQL clients?

Top JavaScript GraphQL clients include urql, Relay, GraphQL-request, GenQL, and Apollo Client. Learn more about each at Top 5 JavaScript GraphQL Clients.

What are the key features of GraphQL-request?

GraphQL-request is lightweight and simple, supports queries, mutations, variables, and headers, and offers TypeScript support and isomorphic usage.

How does GraphQL simplify API usage?

GraphQL represents business models as graphs, defines data structures as objects and their relationships, and provides complete API documentation. Clients can request granular data, preventing under- or over-fetching.

What is the purpose of the gql tag in GraphQL code?

The gql tag is used to define GraphQL queries that will be passed to the client, encapsulating queries and mutations for use in serverless functions or client-side applications.

What are the core concepts of GraphQL Mesh?

GraphQL Mesh enables shaping and building executable GraphQL schemas, accessing data in remote APIs, and aggregating data from multiple sources.

Where can I learn more about Schema Definition Language?

You can learn more about Schema Definition Language at graphql.org/learn/schema/.

Hygraph Product Features & Capabilities

What is Hygraph?

Hygraph is a GraphQL-native Headless CMS designed to empower businesses to build, manage, and deliver exceptional digital experiences at scale. It offers a user-friendly interface, content federation, and enterprise-grade security and compliance. Learn more at Hygraph Product.

What are the key capabilities and benefits of Hygraph?

Hygraph provides operational efficiency, financial benefits, and technical advantages. Key features include Smart Edge Cache, custom roles, rich text superpowers, project backups, and content federation. Proven results include 3X faster time-to-market for Komax and a 15% engagement increase for Samsung. Source: Customer Stories.

How does Hygraph's Smart Edge Cache improve performance?

Smart Edge Cache ensures enhanced performance and faster content delivery, making Hygraph ideal for businesses with high traffic and global audiences. It helps resolve cache issues and performance bottlenecks. More details: Performance Improvements.

What security and compliance certifications does Hygraph have?

Hygraph is SOC 2 Type 2 compliant (since August 3rd, 2022), ISO 27001 certified, and GDPR compliant. These certifications demonstrate Hygraph's commitment to security and compliance. More info: Security Features.

What security features does Hygraph offer?

Hygraph offers granular permissions, SSO integrations, audit logs, encryption at rest and in transit, regular backups, and a transparent process for reporting security issues. Source: Security Features.

How does Hygraph measure and optimize API performance?

Hygraph measures the performance of its GraphQL API and provides practical advice for developers to optimize API usage, ensuring reliability and speed. More details: API Performance Blog.

What feedback have customers given about Hygraph's ease of use?

Customers praise Hygraph's intuitive editor UI, accessibility for non-technical users, and custom app integration. Hygraph was recognized for "Best Usability" in Summer 2023. Source: Try Hygraph.

How easy is it to implement Hygraph?

Implementation time varies by project. For example, Top Villas launched a new project within 2 months. Hygraph offers a free API playground, free developer account, structured onboarding, and extensive documentation. Source: Top Villas Case Study.

What training resources are available for Hygraph?

Hygraph provides webinars, live streams, how-to videos, and extensive documentation for onboarding and ongoing training. Access resources at Hygraph Documentation.

What is the primary purpose of Hygraph?

Hygraph is designed to empower businesses to build, manage, and deliver exceptional digital experiences at scale, eliminating traditional CMS pain points and providing flexibility, scalability, and efficiency for modern workflows.

Use Cases & Customer Success

Who is the target audience for Hygraph?

Hygraph is ideal for developers, product managers, and marketing teams in industries such as ecommerce, automotive, technology, food and beverage, and manufacturing. It serves organizations modernizing legacy tech stacks and global enterprises needing localization and content federation. Source: ICPVersion2_Hailey.pdf.

What problems does Hygraph solve?

Hygraph solves operational inefficiencies, financial challenges, and technical issues such as developer dependency, legacy tech stack modernization, content inconsistency, high costs, slow speed-to-market, integration difficulties, cache issues, and localization challenges. Source: Hailey Feed .pdf.

How does Hygraph address common pain points?

Hygraph eliminates developer dependency, modernizes legacy tech stacks, ensures content consistency, reduces costs, accelerates speed-to-market, simplifies schema evolution, and improves localization and asset management. Source: Hailey Feed - PMF Research.xlsx.

Can you share some customer success stories with Hygraph?

Komax achieved 3X faster time-to-market, Autoweb saw a 20% increase in website monetization, Samsung improved customer engagement by 15%, and Dr. Oetker enhanced their digital experience using MACH architecture. More stories: Customer Stories.

What KPIs and metrics are associated with Hygraph's solutions?

Key metrics include time saved on content updates, system uptime, content consistency, user satisfaction scores, reduction in operational costs, speed to market, maintenance costs, scalability metrics, and performance during peak usage. More details: CMS KPIs Blog.

How does Hygraph differentiate itself from competitors?

Hygraph stands out as the first GraphQL-native Headless CMS, offering flexibility, scalability, and integration capabilities. Its content federation, user-friendly tools, and enterprise-grade features set it apart from platforms like Sanity, Prismic, and Contentful. Source: Hailey Feed - PMF Research.xlsx.

How does Hygraph handle value objections?

Hygraph addresses value objections by understanding customer needs, highlighting unique features, demonstrating ROI, and sharing success stories such as Samsung's 15% engagement improvement. Source: Samsung Case Study.

What is Hygraph's vision and mission?

Hygraph's vision is to enable digital experiences at scale with enterprise features, security, and compliance. Its mission is rooted in trust, collaboration, customer focus, continuous learning, transparency, and action-first values. Source: Contact Hygraph.

Learning & Documentation

How can I learn GraphQL with Hygraph?

Hygraph offers a GraphQL Academy, documentation, and blog resources for learning GraphQL concepts, queries, mutations, and more. Start at Hygraph GraphQL Academy.

Where can I find more information about environments in Hygraph?

Learn more about environments in the documentation or watch Jamie's video tutorial at YouTube.

Where can I learn about building an e-learning platform with Hygraph?

You can read about building an e-learning platform using Hygraph at Building an E-learning Platform.

What is e-learning?

E-learning refers to the delivery of learning materials using interactive electronic systems, including online media, virtual classrooms, enrollment, class management, collaboration, and grading systems. Source: E-learning Architecture.

What does e-learning encompass beyond sharing courses?

E-learning extends to virtual classrooms, real-time online teaching, and offering entire degree programs remotely. Source: E-learning Platform Architecture.

What is the main goal of the learning platform discussed in Hygraph's article?

The main goal is to provide students with high-quality educational content and allow educators to monetize their expertise by offering premium courses behind a payment or login gate. Source: Learning Platform Schema.

How can the content model for lessons be extended in the future?

The lesson content model can be extended to include interactive components such as quizzes or supporting downloads like cheat sheets. Source: Learning Platform Schema.

Where can I learn more about Slate nodes?

You can learn more about Slate nodes at docs.slatejs.org/concepts/02-nodes.

What can I learn from the Hygraph blog post about Netflix clones?

You can learn how to build a Netflix clone using Hygraph and Cursor AI. Source: Netflix Clone Blog.

See Hygraph MCP Server, AI Agents, and Editorial Experience Upgrades in Action

GraphQL

What is GraphQL?

GraphQL is an open-source data query and manipulation language for APIs, and a runtime for fulfilling queries with existing data. GraphQL was developed internally by Facebook in 2012 before being publicly released in 2015.

Key Takeaways

  • GraphQL is a modern query language and a runtime for APIs, widely seen as a successor to REST APIs.
  • GraphQL is built around the concept of "getting exactly what you asked for"without any data under or overfetching.
  • GraphQL makes it easier to aggregate data from multiple sources. It uses a type system rather than multiple endpoints to describe data.
  • The GraphQL Landscape shows an aggregated GraphQL adoption table covering over 116k stars, a market cap of $4.7 trillion, and a funding of over $9 billion.
  • The team at Honeypot filmed a documentary on the history and emergence of GraphQL.

By 2025, GraphQL is no longer the “new kid on the block.” You’ve probably heard of it and its comparison with RESTFUL APIs. However, if you are new to using this query language and want to learn how to use it, Hygraph’s GraphQL academy is your place to be.

Being in the GraphQL field for almost as long as it exists, we are profoundly passionate about this topic and want to share our knowledge with you. You'll find everything you need, from the most basic concepts like how GraphQL works to usage topics like GraphQL schema, mutation, subscription, and many more.

What is GraphQL?

Simply put, GraphQL is a query language for APIs and a runtime for fulfilling those queries with 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 supports reading, writing (mutating), and subscribing to changes to data (real-time updates—most commonly implemented using WebhHooks). GraphQL servers are available for multiple languages, including Haskell, JavaScript, Perl, Python, Ruby, Java, C++, C#, Scala, Go, Erlang, PHP, and R.

Editor's Note

These are developers' favorite languages for working with GraphQL, according to our 2024 GraphQL survey.

  1. TypeScript/JavaScript
  2. Go
  3. Java/Kotlin
  4. C#/.Net
  5. Rust

How does GraphQL work?

The attraction of GraphQL is primarily based on the concept of asking for what you need and receiving just that—nothing more, nothing less. When sending queries to your API, GraphQL returns a very predictable result without any over- or under-fetching, ensuring that apps using GraphQL are fast, stable, and scalable.

Using our website as an example, let's run a query asking for just the titles of articles under the Hygraph Academy to visualize how this would look.

The query would look similar to this:

{
academyPosts {
title
}
}

From here, we can infer that we're just asking for the title of Academy posts and nothing else. Therefore, the results returned would be:

{
"data": {
"academyPosts": [
{
"title": "Headless Mobile Content Management System (Mobile CMS)"
},
{
"title": "What is Content as a Service (Caas)"
},
{
"title": "Headless CMS and SEO Best Practices"
},
{
"title": "What Is A Headless CMS?"
},
{
"title": "Understanding Digital Experience Platforms (DXP) and Headless CMS"
},
{
"title": "Understanding the Content Mesh and how a Headless CMS fits in."
},
{
"title": "The Era of Application Content"
},
{
"title": "Best Practices for Headless Content Modelling"
},
{
"title": "Choosing the best Headless CMS"
},
{
"title": "What is GraphQL?"
},
{
"title": "Choosing a Headless CMS for Content Creators"
},
{
"title": "Selecting a Headless CMS - a Checklist"
},
{
"title": "What is a DXP (Digital Experience Platform)?"
},
{
"title": "What is the JAMStack?"
}
]
}
}

It is easy to highlight how the payload would be minimal on such a simple request. However, GraphQL queries access not just the fields of a single resource but also follow references between them. While typical REST APIs require loading from multiple URLs, GraphQL APIs get all the data in a single request - making apps quick even on slow mobile network connections.

To visualize this, let's try a more complex request: We want to see a list of blog posts on Hygraph, but rather than just the post title, we also want to get the authors these posts are related to, the slugs of the posts, and the categories these blog posts fall under.

The query we'll use for this is:

{
blogPosts{
title
authors {
name
twitterHandle
title
}
slug
categories {
title
}
}
}

The results given back (shortened to just one) look like:

{
"data": {
"blogPosts": [
{
"title": "Delivering a DIY Store powered by a Headless CMS for ECommerce",
"authors": [
{
"name": "Jamie Barton",
"twitterHandle": "notrab",
"title": "Developer Advocate"
},
{
"name": "Jonathan Steele",
"twitterHandle": "ynnoj",
"title": "Developer Advocate"
}
],
"slug": "delivering-a-diy-store-powered-by-a-headless-cms-for-ecommerce",
"categories": [
{
"title": "Content Management"
},
{
"title": "Headless CMS"
},
{
"title": "Projects and Examples"
}
]
}
}

GraphQL APIs are organized in terms of types and fields, not endpoints, making them extremely easy to get up and running since you can access all your data from a single endpoint. GraphQL uses types to ensure apps only ask for what’s possible and provide clear and helpful errors. Apps can use types to avoid writing manual parsing code.

Why GraphQL?

As you learn how GraphQL works with some examples, it should be apparent that it is fast, stable, and scalable. In summation, these are the 3 key characteristics that make GraphQL a dream syntax to use:

  1. Clients can specify exactly what data they need
  2. Aggregating data from multiple sources is easy with GraphQL, and
  3. GraphQL uses a type system to describe data rather than endpoints.

These characteristics make GraphQL data fetching utterly efficient, and offer benefits including easy readability, avoiding under and over-fetching, strong typing, and flexible schema evolution—Discover GraphQL's advantages in more detail here.

Try Hygraph, the GraphQL native headless CMS

Build limitless solutions rapidly with our GraphQL-native API-first approach

The history of GraphQL

Similar to React, GraphQL was developed internally by Facebook in 2012 before being publicly released in 2015. Following GraphQL's transition to being made open source, the GraphQL project was moved from Facebook to the newly established GraphQL Foundation, hosted by the Linux Foundation, in 2018.

The origin of GraphQL comes from Facebook's attempts to scale its mobile app. At the time, their app was an adaptation of their website, and their mobile strategy was to simply "adopt" HTML5 to mobile. Due to issues related to high network usage and a less-than-ideal UX, the team decided to build iOS from scratch using native technologies.

Brenda Clark put the history of GraphQL quite well on LevelUp's post:

The main problem with Facebook’s News Feed implementation on mobile. It wasn’t as simple as retrieving a story, who wrote it, what it says, the list of comments, and who’s liked the post. Each story was interconnected, nested, and recursive. The existing APIs weren’t designed to allow developers to expose a rich, news feed-like experience on mobile. They didn’t have a hierarchical nature, let developers select what they needed, or the capability to display a list of heterogeneous feed stories.
BC
Brenda Clark

Long story short, the core team at Facebook decided they needed to build a new News Feed API, which is when GraphQL began to take shape. Over the next several months, the surface area of the GraphQL API expanded to cover most of the Facebook iOS app, and in 2015, the GraphQL spec was first published along with the reference implementation in JavaScript.

The team at Honeypot made a comprehensible documentary on YouTube about the birth and adoption of GraphQL, providing a highly detailed insight into the technology's emergence.

Adoption of GraphQL

Understandably, GraphQL's adoption skyrocketed since the industry's need for such a solution was quite prevalent. Within half a year, there were already implementations of GraphQL in different languages, including PHP, JavaScript, Python, Scala, and Ruby.

Starting as a "hobbyist" spec, GraphQL rapidly gained enterprise validation and was adopted by companies like GitHub, Yelp, AirBnB, and many more.

The GraphQL Landscape shows an aggregated GraphQL adoption table covering over 222k stars, a market cap of $4.7 trillion, and over $9 billion funding.

Between all the GraphQL servers, clients, gateways, and apps, the GraphQL ecosystem has exploded in market adoption, claiming GraphQL's spot as a force to reckon with.

Editor's Note

Here’s an article that describes when and when not to use GraphQL and whether it's the right choice for you if you're considering adopting it. In addition, we’ve also examined companies that use GraphQL in production.

GraphQL vs. REST

A REST API is an "architectural concept" for network-based software. GraphQL, on the other hand, is a query language and a set of tools that operate over a single endpoint. Over the last few years, REST has been used to create new APIs, while GraphQL has been mainly used to optimize performance and flexibility.

When using REST, you’ll always be returned complete "datasets". If you wanted to request information from x objects, you’d need to perform x REST API requests. If you're requesting information on a product for an eCommerce website, your requests may be structured in this way:

  • Request productInfo for product names, descriptions, etc. in one request
  • Request pricing for prices pertaining to that product in another request
  • Request images for product shots from another dataset
  • ... and so on

While you'll still get everything you asked for, it would be done in several requests, and each dataset might send you tons of other information you didn't want or need, such as reviews, variations, discounts, etc., depending on how the content/data was structured at each endpoint. On one hand, this is extremely simple - you have one endpoint that does one task, so it’s easy to understand and manipulate. In other words, if you have X endpoint, it provides X data.

Conversely, if you wanted to gather some information from a specific endpoint, you couldn’t limit the fields that the REST API returns; you’ll always get a complete data set - or overfetching.

GraphQL uses its query language to tailor the request to exactly what you need, from multiple objects down to specific fields within each entity. GraphQL would take X endpoint, and it can do a lot with that information, but you have to tell it what you want first.

Using the same example, the request would simply be to get productName, productDescription, productImage, and productPrice from the same endpoint, within one request, and no more. All other content within the database wouldn't be returned, so the issue of over-fetching wouldn't be a concern.

For an amusing ELI5 on the topic, Ben Halpern, the founder of dev.to explains the conceptual differences between GraphQL and REST. Worth a read.

Recommended reading

Frequently Asked Questions

What is GraphQL?

GraphQL is a query language for your API, and a server-side runtime for executing queries by using a type system you define for your data.

Is GraphQL better than REST?

It depends on the use case. However, the most commonly stated benefit is that GraphQL solves both over-fetching and under-fetching issues by allowing the client to request only the data that is required. Since there is more efficiency associated with working with GraphQL, development is much faster with GraphQL than it would be with REST.

Is GraphQL faster than REST?

GraphQL queries themselves are not faster than REST queries, but since you have full control over what you want to query and what the payload should be, GraphQL requests will always be smaller and more efficient. GraphQL also enables developers to retrieve multiple entities in one request, from one endpoint, further adding to each query's efficiency.

Why is GraphQL so popular?

GraphQL is commonly associated with a better developer experience through team independence and making API versioning redundant. A strongly typed schema, declarative data fetching, and predictable code & payload are other reasons why GraphQL is favored.

How can I learn GraphQL?

If you’re just getting started with GraphQL, Hygraph's GraphQL Academy, How to GraphQL, and FreeCodeCamp are great places to start.

Why use a GraphQL CMS?

Hygraph is a 100% GraphQL Headless CMS. The advantage here is that you can build projects with minimum payload, client-driven data queries, generated documentation, powerful tooling, and extensive filtering for an utterly flexible interaction with your API. The generated GraphQL API works for read and write operations and scales seamlessly.