State of GraphQL 2022 Survey Report Summary and Insights
Tags: graphql
Published: 2022-10-21 13:13:16

---
title: State of GraphQL 2022 Survey Report Summary and Insights
published: true
date: 2022-10-20 10:57:41 UTC
tags: graphql
canonical_url: https://hasura.io/blog/state-of-graphql-2022-survey-report-summary-and-insights/
---

![State of GraphQL 2022 Survey Report Summary and Insights](https://hasura.io/blog/content/images/2022/10/state-of-graphql-2022.png)

The first "State of GraphQL" survey was released recently, with over 3000 developers participating.

In this post, we will look at the key insights and latest GraphQL trends identified in this survey.

## GraphQL Feature Usage and Popularity

Let's start by looking at the GraphQL features and their usage. We'll see which features are the most and least popular & used by developers.

The most used features are: `fragments`, `interfaces`, `unions`, and `custom scalars`. On the other hand, the least used features are directives such as: `@defer`, `@specifiedBy`, and `@stream`.

> You can learn about some of these GraphQL concepts in this [free GraphQL course](https://hasura.io/learn/graphql/intro-graphql/core-concepts/).

![State of GraphQL 2022 Survey Report Summary and Insights](https://i.imgur.com/Ybav1fT.png)

When it comes to the GraphQL directives, the `@deprecated`, `@include`, and `@skip` directives are the most used.

It's interesting to see the `@defer` and `@stream` directives being amongst the least used/popular features considering that they help improve the app performance by reducing latency. These two directives are great features, so you might want to try them out. You can read more about `@defer` and `@stream` [here](https://hasura.io/blog/types-of-realtime-graphql-subscriptions/#defer-and-stream).

If you are using Hasura to build your GraphQL API, you don't need to use these directives for the use case of streaming real-time data. Hasura comes with [streaming over GraphQL subscriptions](https://hasura.io/blog/instant-streaming-api-built-in-authorization-new-existing-postgres/).

![State of GraphQL 2022 Survey Report Summary and Insights](https://i.imgur.com/ckHIXs9.png)

GraphQL Subscriptions seem to be the popular choice among developers when it comes to real-time data. Meanwhile, most developers are not even aware of Live Queries. That means they are less popular and used compared to GraphQL Subscriptions.

It's important to mention that features such as `@defer`, `@stream`, and live queries are not specified in the official GraphQL specification. Perhaps developers are less inclined to use features that are not included in the GraphQL spec.

![State of GraphQL 2022 Survey Report Summary and Insights](https://i.imgur.com/iCpZ8k4.png)

Moreover, most developers were only aware of a small subset of GraphQL features. If you search for features such as live queries, for example, you won't find a lot of material on the subject. So it makes sense when you see that most developers didn't know about many features. Maybe we, the GraphQL community, could do better to raise awareness of the different GraphQL features.

> In Hasura, Live Queries is a pattern of querying real-time data where a response is returned every time the data changes. Read more about [Hasura's Live Query architecture](https://github.com/hasura/graphql-engine/blob/master/architecture/live-queries.md).

## GraphQL Libraries

In this section, we'll look at the available libraries in the GraphQL ecosystem. We'll go over the following:

- servers
- clients
- API generators
- schema builders

### GraphQL Servers

Let's start by looking at the GraphQL servers developers use to power their APIs.

![State of GraphQL 2022 Survey Report Summary and Insights](https://i.imgur.com/TCkXMLw.png)

According to the survey, the top 5 popular choices are Apollo Server, Express-GraphQL, GraphQL.js, Yoga, and GraphQL-Go.

![State of GraphQL 2022 Survey Report Summary and Insights](https://i.imgur.com/cL07RGj.png)

If we flip the chart and look at the retention rate, we can see a significant change in the rankings. A higher retention rate means developers would use the technology again to build GraphQL servers. The top 5 are as follows:

- DGS
- Absinthe
- GraphQL.js
- Mercurius
- Apollo Servers

It would be interesting to be able to look into why those technologies have a high retention rate. Is it because they have excellent developer experience? Is it because they are complete solutions? Is it because they have lots of features? It would be interesting to know.

![State of GraphQL 2022 Survey Report Summary and Insights](https://i.imgur.com/bRYkxdC.png)

Looking at other tools, we can see Hasura in second place. That shows that Hasura is quite a popular choice for developing GraphQL servers.

![State of GraphQL 2022 Survey Report Summary and Insights](https://i.imgur.com/4u6aWvp.png)

Overall, there are plenty of choices for building GraphQL servers. Looking at the data, we can see that the community is happy with the current state of GraphQL technologies for building servers. Do note that these are libraries or frameworks you use to write a GraphQL server from scratch completely.

### GraphQL Clients

Now let's look at the GraphQL clients developers use to query their APIs.

![State of GraphQL 2022 Survey Report Summary and Insights](https://i.imgur.com/RqmYJK3.png)

When it comes to GraphQL clients, the top 5 most known technologies are as follows:

- Apollo Client
- Relay
- No client
- React Query
- URQL

Looking at the retention rate (whether the developers would use the technology again or not), the chart changes quite a bit.

![State of GraphQL 2022 Survey Report Summary and Insights](https://i.imgur.com/nntttaR.png)

The chart shows that the top 5 clients with the highest retention rate are: GraphQL Hooks, graphql-request, [React Query](https://hasura.io/blog/getting-started-with-react-query/), URQL, and [Apollo Kotlin](https://hasura.io/learn/graphql/android/apollo-client/). Like with the GraphQL servers, it would be nice to understand why they have a high retention rate.

One thing to observe is that GraphQL extends outside the JavaScript ecosystem. We can see clients for Kotlin, Swift, and iOS.

![State of GraphQL 2022 Survey Report Summary and Insights](https://i.imgur.com/PErz4oF.png)

Even though there are only a handful of GraphQL clients, most developers are happy with the pool of choices.

If you are interested in exploring GraphQL clients, check [this article](https://hasura.io/blog/exploring-graphql-clients-apollo-client-vs-relay-vs-urql/).

### API Generators

This section will cover the ORMs, CMSes, and other tools that help developers create a GraphQL API. This category is where Hasura fits in too.

![State of GraphQL 2022 Survey Report Summary and Insights](https://i.imgur.com/5sj2hTL.png)

Hasura is leading the way when it comes to awareness of such tools. Hasura is then followed by:

- Strapi
- Contentful
- AWS AppSync
- Fauna
- Graphene

and others. The chart includes tools such as API generators, content management systems (CMSes), libraries, and plugins.

![State of GraphQL 2022 Survey Report Summary and Insights](https://i.imgur.com/G1NVRir.png)

If we look at the usage of these tools, the chart changes a bit, but Hasura is close to the top spot. It seems that developers prefer to use Hasura.

![State of GraphQL 2022 Survey Report Summary and Insights](https://i.imgur.com/zOBQh6D.jpg)

The above chart illustrates whether developers want to learn/would use a technology again or are not interested/wouldn't use it again. According to the chart, the majority of developers would like to learn how to use Hasura, or they would use it again in their projects.

Looking at the chart, we can see that there are many tools available to build or support GraphQL APIs. Also, Hasura seems to be relatively popular when it comes to API generators.

### Schema Builders

It would be interesting to look at libraries and utilities developers use to build their GraphQL Schema.

The "GraphQL Code Generator" technology is the most popular and used technology. It's a tool that automatically generates code from your GraphQL schema and operations.

Other notable technologies are:

- Type-GraphQL - It enables you to create GraphQL schema and resolvers with TypeScript, using classes and decorators
- gqlgen - Go library for building GraphQL servers
- Pothos - another TypeScript schema builder
- Nexus
- Sangria

To conclude, there are some excellent technologies to help you kickstart your GraphQL API development.

## Other GraphQL Tools

This section is all the tools that help with GraphQL development but don't fit in the previous categories. That includes tools that allow you to combine schemas, data sources, GraphQL IDEs, etc.

![State of GraphQL 2022 Survey Report Summary and Insights](https://i.imgur.com/r5gQcL2.png)

There are cases when you might have multiple GraphQL APIs you want to join together. There are a couple of tools to help you with that, one being [Hasura Data Federation](https://hasura.io/docs/latest/data-federation/index/).

At the moment, Apollo Federation and Schema Stitching are leading the way, but it's worth keeping an eye on to see how things evolve.

![State of GraphQL 2022 Survey Report Summary and Insights](https://i.imgur.com/Gt6sAl5.png)

When it comes to the database used in conjunction with GraphQL, PostgreSQL leads the way, followed by MySQL, MongoDB, Redis, and others. We can also observe that developers prefer SQL databases when working with GraphQL.

By the way, if you wish to get started with PostgreSQL, check out the [introduction to PostgreSQL](https://hasura.io/learn/database/postgresql/introduction/) tutorial.

![State of GraphQL 2022 Survey Report Summary and Insights](https://i.imgur.com/gVuxmYe.png)

Lastly, if we look at the chart, we can see that GraphiQL and GraphQL Playground are the most popular & used tools to query GraphQL APIs. It's expected since they are both designed specifically for GraphQL and do a great job!

Check out the public version of GraphiQL that you can use to share GraphQL queries - [GraphiQL](https://cloud.hasura.io/public/graphiql).

## Summary

The "State of GraphQL" survey gives us valuable insight into the GraphQL ecosystem! Check out the full survey results [here](https://2022.stateofgraphql.com/en-US/).

The survey shows that GraphQL has matured over recent years and is also gaining ground outside the JavaScript ecosystem. Hopefully, in the next release of the GraphQL specification, we will also see features such as live queries and the `@stream` and `@defer` directives added.

All in all, the future looks great!

<!--kg-card-end: markdown-->