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 GitHub stars and GitHub forks. Here’s a link to GraphQL's open source repository on GitHub

Who uses GraphQL?

Companies
2189 companies reportedly use GraphQL in their tech stacks, including Facebook, Shopify, and Instagram.

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

GraphQL Integrations

Prettier, Gatsby, Apollo, Prisma, and Hasura are some of the popular tools that integrate with GraphQL. Here's a list of all 122 tools that integrate with GraphQL.
Pros of GraphQL
75
Schemas defined by the requests made by the user
63
Will replace RESTful interfaces
62
The future of API's
49
The future of databases
13
Self-documenting
12
Get many resources in a single request
6
Query Language
6
Ask for what you need, get exactly that
3
Fetch different resources in one request
3
Type system
3
Evolve your API without versions
2
Ease of client creation
2
GraphiQL
2
Easy setup
1
"Open" document
1
Fast prototyping
1
Supports subscription
1
Standard
1
Good for apps that query at build time. (SSR/Gatsby)
1
1. Describe your data
1
Better versioning
1
Backed by Facebook
1
Easy to learn
Decisions about GraphQL

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

dagim debebe
Needs advice
on
ExpressJSExpressJSReactReact
and
React NativeReact Native

Hi,

I am a student and a junior developer who is a graduating candidate in comp sci major. I am about to start building my final year project which is a real-time messaging application for software developers to Enhance Knowledge Exchange and Problem Solving. It is mainly a chat application with more enhanced features. I am planning to use React and React Native for the frontend and cross-platform mobile apps, Node.js and ExpressJS for the backend, GraphQL for fetching and manipulating data from the backend and PostgreSQL for the database, and finally Socket.IO for the real-time chatting and communication. I would highly appreciate it if anyone here with experience in building similar apps to tell me if I made a good choice or suggest better tech stacks.

Thanks in advance.

See more
Needs advice
on
ApolloApollo
and
HasuraHasura

Hi,

My requirement is to handle large payloads, with huge audio/video data with limited users (10000).

Which GraphQL tool can be used in this scenario?

See more
Needs advice
on
AstroAstroSvelteKitSvelteKit
and
Vue.jsVue.js

Hello everybody! I want to create an easy to use website (and simplified) builder. Users create a site, add their domain and edit Pages inside an Admin Area inside predefined "Blocks" like with Wagtail.

There should be several default templates/themes and layouts. Choosing a different theme might change both the layout and styling. And I'm looking for SSR or SSG with a focus on the end-user's Page performance.

Current Stack:

  • GraphQL for the dynamic part (for example data to Pricing might not be required on the homepage, or images might go into gallery in one theme, and on the homepage in another theme)

  • FastAPI and SQLAlchemy to store Data. I have prior experience with Wagtail and Django and want to stay with Python and learn Fastapi

  • NGINX to handle domain-specific things (the how is not yet refined)

I want a scalable architecture and especially a fast frontend. I'm tending to use SvelteKit, but I'm afraid that the dynamic part won't make me happy after having hundreds of sites, as the bundler cannot load themes dynamically. sveltekit - dynamic import

I want to handle the scenario: Admin-User chooses a theme and other options for the site (domain) and the End-User Frontend/Session/Cookie will have to fetch and store data about the theme and load subsequent calls to prerendered sites.

Also the "hundreds of sites" might not be all covered by 5 Themes, because users may purchase a custom-made theme, and I would have to manage one big project having lots of different Styleguides and flows. I even thought of statically building the site whenever the user makes a change, maybe using Hugo (or VitePress?). Then I would have to take more care with the page recreation and it would be easily routable instead of nesting every component with logic in the frontend... I think. But this I haven't thought through yet.

Can anyone please help?

See more
Dylan Krupp
Needs advice
on
GraphQLGraphQL
and
gRPCgRPC

I used GraphQL extensively at a previous employer a few years ago and really appreciated the data-driven schema etc alongside the many other benefits it provided. At that time, it seemed like it was set to replace RESTful APIs and many companies were adopting it.

However, as of late, it seems like interest has been waning for GraphQL as opposed to increasing as I had assumed it would. Am I missing something here? What is the current perspective regarding this technology?

Currently, I'm working with gRPC and was curious as to the state of everything now.

See more
Needs advice
on
GraphQLGraphQLSymfonySymfony
and
Vue.jsVue.js

Hi all - we've built a very custom and complex application and UI using custom Vue.js + Nuxt.js, which sits on top of a GraphQL API provided by Symfony.

It's a completely custom UI for administration with lots of complex data relationships and the way we've done it has worked very well... however...

Now we need to build a second part of the system, which is a simpler CRUD style application for managing a simpler data object, but one that still has many relationships. It doesn't need quite as much flexibility, but we do need to deliver it faster if possible.

We've looked at various options, for example: - What we've got (Symfony/GraphQL/Apollo/Vue/Nuxt) - A simpler version of the above using a REST API - Symfony + API-Platform + Vue3 - Native Symfony server rendered

When we consider other frameworks, we always seem to hit stumbling blocks - my lead developer is not keen to use anything that will restrict what he can do, but I also need to consider whether there are faster / cheaper / better solutions out there.

The frameworks all seem to be able to create the code to update / delete individual data tables with ease, but make it difficult / impossible when there are complex data relationships.

Does anyone have any other ideas before we continue the way we are doing things?

Thanks in advance.

See more
gsambrotta
Needs advice
on
FirebaseFirebase
and
MongoDB AtlasMongoDB Atlas

We are planning to build a local-based app to provide custom-prepared food based on subscriptions.

This app will have three main parts: a mobile app made with React Native, a web app made with React, and GraphQL API.

The main functionality is providing menus to clients based on their food preferences. This is not real-time but weekly-based.

We will need also a storage place for documents and images. We would love to have fewer services as possible.

The team is made by fullstack JavaScript developers which means mostly experienced with MongoDB. What we are still considering is:

  1. Use Firebase (easier, has storage, is good for mobile) or MongoDB Atlas (already experience with it, easy to use, flexible. Not sure about storage tho) but with Mongo I am concern about storage system. I know MongoDB can store large file but I wonder if is good practice. Where Firebase as storage as service.
  2. if we choose MongoDB would make sense to use Realm? What are the pro and cons?

We are going to use GraphQL and we want to host them where our db is gonna be.

See more

Blog Posts

GitHubDockerReact+17
41
37665
GitHubPythonNode.js+47
55
72901

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
27807 developers follow GraphQL to keep up with related blogs and decisions.