5K
4.3K
+ 1
257

What is GraphQL?

GraphQL is a data query language and runtime designed and used at Facebook to request and deliver data to mobile and web apps since 2012.
GraphQL is a tool in the Query Languages category of a tech stack.
GraphQL is an open source tool with 12.2K GitHub stars and 841 GitHub forks. Here’s a link to GraphQL's open source repository on GitHub

Who uses GraphQL?

Companies
874 companies reportedly use GraphQL in their tech stacks, including Facebook, Instagram, and medium.com.

Developers
3962 developers on StackShare have stated that they use GraphQL.

GraphQL Integrations

LoopBack, Graphene, Bit, VelocityDB, and Trails are some of the popular tools that integrate with GraphQL. Here's a list of all 48 tools that integrate with GraphQL.

Why developers like GraphQL?

Here’s a list of reasons why companies and developers use GraphQL
GraphQL Reviews

Here are some stack decisions, common use cases and reviews by companies and developers who chose GraphQL in their tech stack.

Node.js
Node.js
GraphQL
GraphQL
MongoDB
MongoDB

I just finished the very first version of my new hobby project: #MovieGeeks. It is a minimalist online movie catalog for you to save the movies you want to see and for rating the movies you already saw. This is just the beginning as I am planning to add more features on the lines of sharing and discovery

For the #BackEnd I decided to use Node.js , GraphQL and MongoDB:

  1. Node.js has a huge community so it will always be a safe choice in terms of libraries and finding solutions to problems you may have

  2. GraphQL because I needed to improve my skills with it and because I was never comfortable with the usual REST approach. I believe GraphQL is a better option as it feels more natural to write apis, it improves the development velocity, by definition it fixes the over-fetching and under-fetching problem that is so common on REST apis, and on top of that, the community is getting bigger and bigger.

  3. MongoDB was my choice for the database as I already have a lot of experience working on it and because, despite of some bad reputation it has acquired in the last months, I still believe it is a powerful database for at least a very long list of use cases such as the one I needed for my website

See more
Nick Rockwell
Nick Rockwell
CTO at NY Times · | 28 upvotes · 407.2K views
atThe New York TimesThe New York Times
MySQL
MySQL
PHP
PHP
React
React
Apollo
Apollo
GraphQL
GraphQL
Node.js
Node.js
Kafka
Kafka
Apache HTTP Server
Apache HTTP Server

When I joined NYT there was already broad dissatisfaction with the LAMP (Linux Apache HTTP Server MySQL PHP) Stack and the front end framework, in particular. So, I wasn't passing judgment on it. I mean, LAMP's fine, you can do good work in LAMP. It's a little dated at this point, but it's not ... I didn't want to rip it out for its own sake, but everyone else was like, "We don't like this, it's really inflexible." And I remember from being outside the company when that was called MIT FIVE when it had launched. And been observing it from the outside, and I was like, you guys took so long to do that and you did it so carefully, and yet you're not happy with your decisions. Why is that? That was more the impetus. If we're going to do this again, how are we going to do it in a way that we're gonna get a better result?

So we're moving quickly away from LAMP, I would say. So, right now, the new front end is React based and using Apollo. And we've been in a long, protracted, gradual rollout of the core experiences.

React is now talking to GraphQL as a primary API. There's a Node.js back end, to the front end, which is mainly for server-side rendering, as well.

Behind there, the main repository for the GraphQL server is a big table repository, that we call Bodega because it's a convenience store. And that reads off of a Kafka pipeline.

See more
Adam Neary
Adam Neary
Engineer at Airbnb · | 26 upvotes · 385.3K views
atAirbnbAirbnb
GraphQL
GraphQL
GraphQL Playground
GraphQL Playground
Apollo
Apollo
#BackendDrivenUI
#Prisma

At Airbnb we use GraphQL Unions for a "Backend-Driven UI." We have built a system where a very dynamic page is constructed based on a query that will return an array of some set of possible “sections.” These sections are responsive and define the UI completely.

The central file that manages this would be a generated file. Since the list of possible sections is quite large (~50 sections today for Search), it also presumes we have a sane mechanism for lazy-loading components with server rendering, which is a topic for another post. Suffice it to say, we do not need to package all possible sections in a massive bundle to account for everything up front.

Each section component defines its own query fragment, colocated with the section’s component code. This is the general idea of Backend-Driven UI at Airbnb. It’s used in a number of places, including Search, Trip Planner, Host tools, and various landing pages. We use this as our starting point, and then in the demo show how to (1) make and update to an existing section, and (2) add a new section.

While building your product, you want to be able to explore your schema, discovering field names and testing out potential queries on live development data. We achieve that today with GraphQL Playground, the work of our friends at #Prisma. The tools come standard with Apollo Server.

#BackendDrivenUI

See more
Robert Zuber
Robert Zuber
CTO at CircleCI · | 16 upvotes · 310.9K views
atCircleCICircleCI
Next.js
Next.js
React
React
Storybook
Storybook
TypeScript
TypeScript
Emotion
Emotion
GraphQL
GraphQL
Apollo
Apollo
Jest
Jest
Percy
Percy
Cypress
Cypress

We are in the process of adopting Next.js as our React framework and using Storybook to help build our React components in isolation. This new part of our frontend is written in TypeScript, and we use Emotion for CSS/styling. For delivering data, we use GraphQL and Apollo. Jest, Percy, and Cypress are used for testing.

See more
Russel Werner
Russel Werner
Lead Engineer at StackShare · | 15 upvotes · 207.3K views
atStackShareStackShare
GraphQL
GraphQL
React
React
Apollo
Apollo
Redux
Redux
#FrontEndFrameworks

Earlier this year we decided to go "all-in" on GraphQL to provide our front-end API. We needed a stable client library to power our React app. We decided to use Apollo Client for a few reasons:

1) Stability 2) Maturity 3) Heaps of features 4) Great documentation (with use cases) 5) Support for server-side rendering 6) Allowed us to stop using Redux and Mobx

Overall we've had great success with this library, along with a few minor hiccups and work arounds, but no show stoppers. If you are coming from Redux.js land, it takes a bit of time to settle into a new way of thinking about how your data is fetched and flows through your React app. This part has been the biggest learning curve of anything to do with GraphQL.

One of the downsides to Apollo Client, once you build a larger application, (past the size of most of the documented use cases and sample apps) the state management tends to get distributed through various places; and not just components. Apollo Client has a state management feature that relies on a normalised local cache. Mastering the knowledge of how this works is key to getting the most out of the library and to architecting your component hierarchy properly.

#FrontEndFrameworks

See more
Adam Neary
Adam Neary
Engineer at Airbnb · | 14 upvotes · 372.9K views
atAirbnbAirbnb
Git
Git
Visual Studio Code
Visual Studio Code
GraphQL
GraphQL
Apollo
Apollo
#GraphQLSchema

One of the joys I wanted to demonstrate in a GraphQL Summit talk I did is having so many helpful tools at my fingertips while building our product at Airbnb. This includes access to Git in Visual Studio Code, as well as the integrated terminal and tasks for running frequently-needed commands.

Of course, we also had some fun stuff to show for GraphQL and Apollo! The part that most people had not seen was the new Apollo GraphQL VS Code Extension. There is no need for me to copy over all juicy features from their marketing site (there are many!), but I will elaborate on one feature: Schema Tags.

If you are going to lint your queries against the schema you are working on, you will invariably be presented with the decision of “which schema?” The default may be your production schema (“current,” by convention), but as we discuss in the demo, if you need to iterate and explore new ideas, you need the flexibility of targeting a provisional schema.

Since we are using Apollo Engine, publishing multiple schemas using tags allows us this flexibility, and multiple engineers can collaborate on a single proposed schema. Once proposed schema changes for a service are merged upstream and those changes are naturally flowing down in the current production schema, we can flip back to “current” in VS Code. Very cool.

#GraphQLSchema

See more

GraphQL's Features

  • Hierarchical
  • Product-centric
  • Client-specified queries
  • Backwards Compatible
  • Structured, Arbitrary Code
  • Application-Layer Protocol
  • Strongly-typed
  • Introspective

GraphQL Alternatives & Comparisons

What are some alternatives to GraphQL?
gRPC
gRPC is a modern open source high performance RPC framework that can run in any environment. It can efficiently connect services in and across data centers with pluggable support for load balancing, tracing, health checking...
Falcor
Falcor lets you represent all your remote data sources as a single domain model via a virtual JSON graph. You code the same way no matter where the data is, whether in memory on the client or over the network on the server.
React
Lots of people use React as the V in MVC. Since React makes no assumptions about the rest of your technology stack, it's easy to try it out on a small feature in an existing project.
graphql.js
Lightest GraphQL client with intelligent features. You can download graphql.js directly, or you can use Bower or NPM.
MongoDB
MongoDB stores data in JSON-like documents that can vary in structure, offering a dynamic, flexible schema. MongoDB was also designed for high availability and scalability, with built-in replication and auto-sharding.
See all alternatives

GraphQL's Followers
4325 developers follow GraphQL to keep up with related blogs and decisions.
Davide Donattini
nugas sxtra
cryptotemple
Calvin Park
Connor Young
Sjon Gast, de
elbachir noubaa
Deep Mazumder
Israel Bastida
İbrahim Alkan