giraphql VS graphql-ws

Compare giraphql vs graphql-ws and see what are their differences.


GiraphQL is library for creating GraphQL schemas in typescript using a strongly typed code first approach (by hayes)


Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client. (by enisdenjo)
Our great sponsors
  • OPS - Build and Run Open Source Unikernels
  • Scout APM - Less time debugging, more time building
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
giraphql graphql-ws
6 15
356 928
- -
9.6 9.1
7 days ago about 2 months ago
TypeScript TypeScript
ISC License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.


Posts with mentions or reviews of giraphql. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-05-19.
  • How do you test your graphql on the server?
    1 project | | 26 Jul 2021
    Here is an example:
  • What do you think about nexus? I'm new at this and wondering if I should use it in my project.
    3 projects | | 19 May 2021
    There are multiple ways available of constructing a graphql schema. Usually, you can break down those into "SDL" First and "Code" First. A simple example of a Code First approach is the programmatic graphql.js API using `new GraphQLObjectType`. You define your schema with code. In an SDL First approach, you write your schema in the GraphQL SDL (as text) and define a resolver map. You can find some examples over here: A lot of tooling has emerged of those two methods of building GraphQL schemas and you usually have to choose whether you wanna stick to Code First or SDL First. Tools like gqtx (, giraphql (, and nexus ( are built around the Code First approach and improve the developer experience over the programmatic API form graphql.js by providing a more type-safe API when utilizing TypeScript. They ultimately all do the same, with slightly (more or less opinionated) different APIs. On the other hand tooling for SDL has also evolved. graphql-tools provides a more advanced interface over how you define the resolvers map and a lot of utilities for constructing your schema from SDL/resolver map partials distributed across different files ( Together, with graphql-codegen resolver type generation ( you can bring this to the next level if you are working with TypeScript and generate fully typed resolvers from the GraphQL SDL. You have to find out for yourself which approach is best suited for you. I have been using both on different projects and they both have benefits and trade-offs. My opinion is mostly based on the TypeScript developer experience. Code First seems to be the better pick for me if you have lots of computed fields that cannot be mapped 1:1 to the data sources, where you would have to add a lot of type resolver mappings configuration for codegen. With SDL I like that I have the feeling that I can write the schema faster and less clumsy, and the SDL is immediately readable. On Code First you, however, can still generate an SDL file from the coding schema. Maybe there is a niche open for an approach that combines Code and SDL First approaches. We will have to see what the future brings. Here are some more articles/threads regarding the topic:\_vs\_schemafirst\_development/ Also, note that most GraphQL server/transports do or should not care about the way you construct your schema. E.g. the apollo-server docs show you only an SDL first way of constructing the schema (, but it is also possible to provide a schema instance( apollo-server defaults to advocating creating a schema with SDL (by using an old [email protected] version under the hood).
    3 projects | | 18 May 2021
    Tools like gqtx (, giraphql (, and nexus ( are built around the Code First approach and improve the developer experience over the programmatic API form graphql.js by providing a more type-safe API when utilizing TypeScript. They ultimately all do the same, with slightly (more or less opinionated) different APIs.
  • What are your thoughts on Next/Apollo/Prisma stack? Should I use it for my project (see details in the description)? Can you share some advice?
    6 projects | | 14 May 2021
    You will also have to figure out which schema generation flow suits you best. E.g. you can use the programatic API from graphql-js, makeExecutableSchema from graphql-tools or code schema builders like or
  • GiraphQL: a plugin based schema builder for creating code-first GraphQL schemas in typescript
    1 project | | 10 Apr 2021
  • Nexus and directive
    2 projects | | 29 Mar 2021
    The actual implementation is almost laughably simple, it's just getting the types right that is a bit of a pain:


Posts with mentions or reviews of graphql-ws. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-10-25.
  • Advice on using graphql-ws with Apollo/React
    2 projects | | 25 Oct 2021
    That said, I feel so close to success that I can't quite give up. I am using graphql-ws as I understand this to be the new standard implementation of GraphQL Subscriptions. However, of course, Apollo subscriptions have not been updated to implement this. So, looking at the Recipes over on the graphql-ws documentation I have found the guide for using Apollo client. However as I am new to Apollo, it is using a lot of terms I am unfamiliar with.
  • GraphQL Subscriptions and Mikro-Orm in 2021
    2 projects | | 14 Oct 2021
    Okay but seriously, if you've fallen down the rabbit hole of Apollo docs pointing you towards one library (subscription-transport-ws) which then points you to another (graphql-ws) , and so on and so forth, then hopefully this helps pull you out.
  • How does a client know if the server managing its subscription goes offline? (Multiple instances)
    2 projects | | 23 Sep 2021
    The most common protocol used today for subscriptions is the Apollo websocket protocol.
  • Graphql Subscriptions w/o apollo
    1 project | | 15 Sep 2021
    GraphQL subscriptions are just web sockets. You can check graphql-ws package if you want something without Apollo dependency. Though I don't understand why you want to not depend on it in the first place.
  • GraphQL Tools V8 - Stitch Federation Services
    4 projects | | 29 Jul 2021
    New GraphQL-WS ✔️
  • Subscriptions and Live Queries - Real Time with GraphQL
    5 projects | | 29 Jul 2021
    The interesting thing is that we can use any transport for delivering the results to client. The most popular implementation (as mentioned before) is subscriptions-transport-ws. Unfortunately, since it is poorly maintained, the GraphQL Working Group came up with a new implementation over WebSockets, graphql-ws.
  • GraphQL over WebSockets
    9 projects | | 29 Jul 2021
    Okay, so, how do I use WebSockets to add support for the GraphQL subscription operation? Doing a basic Google search, you’d be faced with a single solution, namely subscriptions-transport-ws. Looking through the repository, checking recent comments, reading through the issues and open PRs - might have you notice the abundance of bugs and their security implications. A summary can be found here.
  • I need a little help implementing user online status tracking with Apollo/GraphQL.
    7 projects | | 10 Jun 2021
    Have you thought about using graphql-ws instead? It uses the new graphql-transport-ws protocol which also has an open RFC that is discussed in the GraphQL working Groups.
    7 projects | | 10 Jun 2021
    Not sure about apollo, but graphql-ws has an example for supporting multiple protocols. search for ws server usage on a multi WebSocket server on the readme
    7 projects | | 10 Jun 2021
    The graphql-ws readme show an example setup together with apollo-server-express

What are some alternatives?

When comparing giraphql and graphql-ws you can also consider the following projects:

subscriptions-transport-ws - :arrows_clockwise: A WebSocket client + server for GraphQL subscriptions

apollo-server - 🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.

graphql-helix - A highly evolved GraphQL HTTP Server 🧬

GraphQL Kotlin - Libraries for running GraphQL in Kotlin

better-sqlite3 - The fastest and simplest library for SQLite3 in Node.js.

react-relay - Relay is a JavaScript framework for building data-driven React applications.

graphql-tools - :wrench: Build, mock, and stitch a GraphQL schema using the schema language

graphql-spec - GraphQL is a query language and execution engine tied to any backend service.

ws - Simple to use, blazing fast and thoroughly tested WebSocket client and server for Node.js

nexus - Code-First, Type-Safe, GraphQL Schema Construction

graphql-sse - Zero-dependency, HTTP/1 safe, simple, GraphQL over Server-Sent Events Protocol server and client.