Log in to GraphQL Editor
State of GraphQL 2022 survey
Michal

Michał Tyszkiewicz

10/12/2022

State of GraphQL 2022 survey

The authors of State of JavaScript had been including GraphQL in their survey for a while, though it was a bit hidden under the Data Layer subcategory. It did tell us a lot about the incredible growth of GraphQL over the last few years. Usage skyrocketed from just 6% in 2016 all the way up to 47% in 2020 and other metrics were even more impressive. It recorded very high satisfaction at 94%, interest at 87% and awareness at 98% topping each of the three categories. In 2021 the authors opted to remove it from the State of JS survey as it was a bit out of place there, but now we have a dedicated version: the first ever State of GraphQL survey where we can do a deeper dive into the rapidly growing ecosystem.

Language features

Feature knowledge and usage is indicative of the fact that GraphQL is a rapidly growing but still fairly new language. Core features were pretty well known and used but as far as directives only @deprecated was used by more than 40% of respondents, similarly for security & performance features only authentication cracked 50%. As for custom features subscriptions were by far the most used with over 40%, with schema stitching a distant second at 26%. All of that was pretty well illustrated in the knowledge score where the biggest group of respondents ranked at the bottom with 0-10% knowledge of the features, although on the whole over half of the respondents knew at least 50% of the features in the survey which hints at a pretty big group of GraphQL experts.

Libraries

As far as actual usage of the language goes, the libraries were divided into 4 categories: Servers, Clients, API Generators and Schema Builders and ranked based on usage, retention, interest and awareness. Looking at usage first, obviously Apollo beats everyone else and that’s also reflected in the overall results for Servers and Clients (due to how widely used Apollo Server and Client is) but taking a closer look at the data reveals a few more interesting facts.

API Generators: room for growth

A quite broad category encompassing various different tools that help with creating an API. It showed a diverse field with no clear winner in terms of popularity or usage, but some important hints in regards to high interest combined with high user retention, which are important strengths that can mean a lot of future growth.

  • usage: the top were Contentful, Hasura, Strapi, AWS AppSync and GraphQL Editor, however as neither cracked 20% the room for growth is evident here
  • interest: GraphQL Mesh, Fauna, Sanity, Hasura, GraphQL Editor and Strapi were all around the 60% mark showing a lot of potential new users especially considering far lower usage numbers
  • retention: GraphQL Editor was 1st with a near 90% user retention score with only GraphQL Mesh at 2nd cracking 80%

Apollo’s dominance

Its no surprise both the Server and Client section showed a clear dominance of the Apollo Server and Client libraries. Though both were beaten by other libraries in terms of interest and user retention, which might signal users' willingness to jump ship to other libraries over time, especially if provided with a better alternative. The Schema Builders section also had one clear leader

Guild’s GraphQL Code Generator which ranked 1st in all categories, but we're very happy to see our own GraphQL Zeus also appear there.

Most used Web framework, Database & IDE

It wouldn't be a complete survey without looking at other use cases and tools used in conjunction with GraphQL so the authors put the remainder in the 'other tools' section and ranked them based on declared usage:

  • Web Frameworks: Next.js and Create React App led the pack with others below 10% usage
  • Databases: PostgreSQL was by far the most popular database with over 30% usage, MySQL was a distant second with almost 14%
  • IDEs: recently updated to 2.0 GraphiQL at 30% was slightly ahead of GraphQL Playground at 27%
  • Server Languages: TypeScript was significantly ahead of JavaScript with other backend languages barely registering on the graph
  • Others: Dataloader, Prisma and GraphQL ESLint registered fairly high usage hinting at possible integration options for larger tools

GraphQL Use Cases

For API types, exposed APIs intended for use with own website/apps and private unexposed APIs for internal usage accounted for 75% of use cases. This highlights a lot of interest in the language but a bit of a hesitancy to using it for publicly available APIs. As for API clients, browsers were the unsurprising overwhelming choice with mobile apps a distant second. The data sources category showed a significant number of respondents still using REST backends as REST APIs were second only to databases. As for industry sectors Programming was obviously first, but with barely 16% it does highlight that GraphQL is now used broadly and in almost every business sector.

Strong Points and Pain Points

This section showed the main reasons for using GraphQL: Type-Safety, avoiding over-fetching, introspection and aggregating results as the main reasons. While community ranked last for strong points, it's not like it's some damnation of it as tooling and ecosystem ranked pretty high. It’s likely simply a question of its size, as even though it is rapidly growing it still is very little compared to other languages, but looking at the broader picture we can be certain that will surely change. For pain points the main selected were error handling, performance, security and client-side caching which should also indicate a direction for the community.

Continued growth and the road ahead

GraphQL is now clearly a mainstay on the programming scene and it's hardly a suprise to see it used more and more for application development. The ecosystem and community is still rapidly growing though and there is a lot of space for improvement and building on top of its strengths. As far as pain points go, there is a growing number of tools and companies dedicated to finding better solutions for security, caching, error tracing and more so it only remains to be seen how those will be handled in the future. Regardless of that it’s clear that the community is growing and interested in trying out a variety of new tools and libraries which makes it apparent the overall growth trend will probably only continue down the line. It also obviously means growth for us as well! We're very grateful 🎉 to the community for appreciating both GraphQL Editor and GraphQL Zeus and we promise we're going to keep improving them both and climbing the ranks in the survey in the future 🚀.

view the survey directly at stateofgraphql.com

Check out our other blogposts

GraphQL Best Practices
Tomek Poniatowicz
Tomek Poniatowicz
GraphQL Best Practices
2 min read
about 5 years ago
React - the rise of the JavaScript powerhouse
Michał Tyszkiewicz
Michał Tyszkiewicz
React - the rise of the JavaScript powerhouse
5 min read
about 3 years ago
GraphQL tools & libraries - Part 2
Michał Tyszkiewicz
Michał Tyszkiewicz
GraphQL tools & libraries - Part 2
4 min read
over 3 years ago

Ready for take-off?

Elevate your work with our editor that combines world-class visual graph, documentation and API console

Get Started with GraphQL Editor