How Companies are Using GraphQL and What They Migrated From

Trevor Heath
Novvum
5 min readMar 14, 2019

--

This article is the final part of a three-part series:

  1. Introduction: “Introducing the GraphQL Survey Series: Insight from Successful GraphQL Adopters
  2. Part 1: “Why Companies are Adopting GraphQL
  3. Part 2: “What Experienced Teams Want You to Know about Migrating to GraphQL
  4. Part 3: “How Companies Are Using GraphQL & What They Migrated From”

**Follow us on Twitter to get notified about other cool articles

For our final GraphQL Survey Series article, we will explore how companies are using GraphQL and what technologies they migrated from. We will also explore some creative ways GraphQL is currently being used. Let’s jump in!

Results

The following results are not a representation of the entire GraphQL community, however, they provide some great insights from companies who volunteered to share their experiences.

Question 1: Are you currently using GraphQL in production?

Our survey was targeted at companies experienced in GraphQL, so we expected that most had implemented it in production. Either way, it is exciting to see companies feeling confident in the technology and their implementations.

Question 2: If GraphQL is being used in production which of the following applies (select all that apply):

  • Internal Applications (e.g. Tooling, Internal Projects)
  • External Applications (Consumer Facing Products)
  • Other

Knowing how we used GraphQL within our own company we were curious to see how others used it and whether the uses varied with the size of the company. What we found was that out of the 93% of companies who were currently using GraphQL in production a majority was using it for external facing applications.

One of the primary advantages of GraphQL is that it can speed up front-end development velocity. If companies are looking for a way to run through quicker product iterations, GraphQL can facilitate that. Quicker product iterations are powerful when focused on user experience for customers, thus making GraphQL desirable for external, user-focused applications. You can read more about the expectations vs outcomes in our first series article.

Question 3: What protocol did you use before you migrated to GraphQL: REST, SOAP, RPC, or a combination of these?

To grasp the development journey of our survey takers, we wanted to know which technologies they had moved from. It was fairly clear that out of the 30+ companies surveyed that most migrated from a RESTful protocol. Please note that we received no answers for SOAP or RPC.

Our team has found that relying solely on GraphQL is not always realistic. Sometimes protocols like REST handle performance or implementation details better. It is common for companies to rely on multiple API protocols, and for that reason the ability of GraphQL to unify disparate endpoints has exciting potential. For many frontend targeted use cases, GraphQL can act as the single source of truth for an application’s information no matter where the underlying business logic or data is housed.

Now, some fun use-cases!

GraphQL is not opinionated & agnostic to databases. This means past it’s core principles every implementation may be different. Let’s explore some interesting examples of how GraphQL is being used in the wild. Some of these examples are from companies who participated in the survey, and others are implementations we found unique and worth mentioning.

1. Using GraphQL as a wrapper around an established infrastructure

One of the simplest ways to introduce GraphQL to your stack is to create a gateway/abstraction layer (wrapper) on top of your current infrastructure. This is a great way to benefit from GraphQL quickly and with little risk. Coursera outlined how to do this in an article they wrote in late 2017. Since then, they have iterated and may have a brand new API but the following blog outlines their initial journey, which is still a common path for many companies.

2. Using GraphQL to directly drive user experience

Backend Driven UI (may be called other names) is the pattern of sending layout, copy or UI specific information from a GraphQL endpoint rather than just data. I have discussed this concept before in a blog article but would like to highlight it again as an established convention used in scaled production. Airbnb is in the forefront of GraphQL implementation and Adam Neary has done a great job of outlining their use case in this article.

3. Using GraphQL a public facing API

GraphQL is becoming a go-to for companies exposing a public dataset or API. Github was one of the first and most notable companies to make a GraphQL endpoint for developers to consume. The flexibility and natural documentation of GraphQL make it a powerful technology for external/public APIs. Read more about Github’s original decision here:

4. Using GraphQL to manage the “state” of complex UI!

This is a very unique use case where a GraphQL API is being used to build and maintain a 3D scene on a screen using Three.js. It may not be a practical use-case, but it highlights how GraphQL can be used as an engine to manipulate a user interface, no database required.

5. To easily access configuration information!

In a more developer focused way, GatsbyJS has cleverly used GraphQL to expose site/codebase configuration information. Along with third-party API data, GatsbyJS provides quick access to your own site’s metadata, static content, routing information and even plugin and package information. Rather than stopping on a data-focused API Gatsby found a way to improve the developer experience by providing quicker access to the site’s metadata.

Final Thoughts

Unfortunately, I am not able to list every way a team can adopt GraphQL but as you can see GraphQL has a wide array of applications. As the community and technology mature, this list will grow and the practical use cases will rise to the top. If you have an interesting or creative way you have adopted the technology, we would love to hear about it.

*To learn more about our team at Novvum + GraphQL check us out here: novvum.io/graphql

--

--