subscriptions-transport-ws VS graphql-over-http

Compare subscriptions-transport-ws vs graphql-over-http and see what are their differences.

subscriptions-transport-ws

:arrows_clockwise: A WebSocket client + server for GraphQL subscriptions (by apollographql)

graphql-over-http

Working draft of "GraphQL over HTTP" specification (by graphql)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
subscriptions-transport-ws graphql-over-http
11 12
1,515 358
- 1.7%
6.2 7.2
about 2 years ago 28 days ago
TypeScript JavaScript
MIT 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.

subscriptions-transport-ws

Posts with mentions or reviews of subscriptions-transport-ws. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-02-09.
  • Fixing a 3 second lockup in our app by switching from Apollo Client to URQL
    2 projects | dev.to | 9 Feb 2023
    Additionally, we created a bit more work for ourselves by upgrading the library we use for GraphQL subscriptions over web sockets, moving from the seemingly unmaintained subscriptions-transport-ws to the active graphql-ws project (which is URLQ’s library of choice for subscriptions).
  • Is this a graphql thing or JSON thing?
    2 projects | /r/graphql | 27 Dec 2021
  • GraphQL Subscriptions and Mikro-Orm in 2021
    2 projects | dev.to | 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.
  • Looking for GraphQL server with ws-transport ability
    3 projects | /r/rust | 10 Oct 2021
    I'm looking for graphql server that can do queries and mutations over websocket, like subscriptions-transport-ws. Juniper and async-graphql both looks promising and async-graphql at least uses wording Subscriptions (WebSocket transport) in features but i couldn't find much more or any examples about that from the docs or repo.
  • three ways to deploy a serverless graphQL API
    13 projects | dev.to | 4 Oct 2021
    graphql-yoga is built on other packages that provide functionality required for building a GraphQL server such as web server frameworks like express and apollo-server, GraphQL subscriptions with graphql-subscriptions and subscriptions-transport-ws, GraphQL engine & schema helpers including graphql.js and graphql-tools, and an interactive GraphQL IDE with graphql-playground.
  • How does a client know if the server managing its subscription goes offline? (Multiple instances)
    2 projects | /r/graphql | 23 Sep 2021
    The javascript implementation is at subscriptions-transport-ws
  • GraphQL over WebSockets
    9 projects | dev.to | 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.
  • The Stack #3
    22 projects | dev.to | 29 Jul 2021
    While subscription-transport-ws from Apollo initially started off this journey, it is not actively maintained and GraphQL WS by Denis definitely is a great replacement to that having no external dependencies and having the ability to work across many frameworks.
  • I need a little help implementing user online status tracking with Apollo/GraphQL.
    7 projects | /r/graphql | 10 Jun 2021
    apollo-server plans to remove WebSocket support, which is currenlty done over the deprecated graphql-ws protocol (as implemented by the unmaintained subscription-transport-ws module by apollo), in the next major version.
  • GraphQL Query and Mutation over Websockets
    3 projects | /r/graphql | 6 Jun 2021
    https://github.com/apollographql/subscriptions-transport-ws, which is used by Apollo Server does support executing queries and mutations actually but you are better off moving away it anyway (check the text in their README!)

graphql-over-http

Posts with mentions or reviews of graphql-over-http. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-08-15.
  • What complaints do you have about GraphQL?
    1 project | /r/graphql | 12 Oct 2023
    Another major pain is the fact that operation names and HTTP codes are often hidden in request bodies which makes it really hard to see what is going on in standard monitoring tools. It's possible to write some converter but it's beyond me why some people decided that requests which failed on the server respond with status 200. GraphQL spec doesn't define how it should behave, there's only a proposal (https://github.com/graphql/graphql-over-http)
  • GraphQL errors: the Good, the Bad and the Ugly
    1 project | dev.to | 5 Jan 2023
    The GraphQL over HTTP specification states the following:
  • Websocket with socket.io or GraphQL subscriptions
    4 projects | /r/graphql | 15 Aug 2022
    However, if you are doing GraphQL subscriptions over Server Sent Events (HTTP) (which is currently not part of the GraphQL over HTTP specification), the data flow is only from server to client. So each operation must be a separate request, which should be no problem when using HTTP/2, as the browser connection limit is not hit so fast (There are also workarounds to this if you cannot ise HTTP/2).
  • Question about using fetch with a delete mutation
    1 project | /r/graphql | 12 Apr 2022
    Complementary to the note, you can learn more about GraphQL over HTTP in the specification over here: https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md
  • Announcing GraphQL Yoga 2.0!
    10 projects | dev.to | 29 Mar 2022
    GraphQL-spec, GraphQL-over-HTTP: guarantees your GraphQL API to work with all existing GraphQL clients (Apollo, Relay, URQL, and more).
  • The Anatomy of a GraphQL Request
    3 projects | dev.to | 30 Jan 2022
    Note: While GraphQL can be done over almost any protocol, this article focuses on the most commonly used protocol GraphQL over HTTP. However, most knowledge can be transferred to other protocols such as GraphQL over WebSockets or other more exotic ones.
  • Is graphql payload usually like a string of query?
    1 project | /r/graphql | 4 Dec 2021
    There is also the GraphQL over HTTP Specification repository https://github.com/graphql/graphql-over-http
  • GraphQL over SSE (Server-Sent Events)
    5 projects | dev.to | 31 Aug 2021
    graphql-sse is a reference implementation of the GraphQL over Server-Sent Events Protocol aiming to become a part of the GraphQL over HTTP standard.
  • GraphQL over WebSockets
    9 projects | dev.to | 29 Jul 2021
    With no further ado - I humbly introduce graphql-ws. A coherent, feature-full, zero-dependency, plug-n-play, lazy, simple, server and client implementation of the new, security first GraphQL over WebSocket Protocol with full support for all 3 GraphQL operations: Queries, Mutations and Subscriptions. The protocol aims to be standardised and become a part of GraphQL with the help of the foundation’s GraphQL over HTTP work group.
  • How to handle errors that are from "context creation" ?
    1 project | /r/graphql | 30 Jun 2021
    You could additionally also choose a specific HTTP code for that scenario (although that would contradict the official GraphQL over HTTP spec https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md).

What are some alternatives?

When comparing subscriptions-transport-ws and graphql-over-http you can also consider the following projects:

graphql-ws - Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client.

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

uWebSockets.js - μWebSockets for Node.js back-ends :metal:

fastify-websocket - basic websocket support for fastify

mercurius - Implement GraphQL servers and gateways with Fastify

graphql-yoga - 🧘 Rewrite of a fully-featured GraphQL Server with focus on easy setup, performance & great developer experience. The core of Yoga implements WHATWG Fetch API and can run/deploy on any JS environment.

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

redwood - The App Framework for Startups

altair - ✨⚡️ A beautiful feature-rich GraphQL Client for all platforms.

graphql-subscriptions - :newspaper: A small module that implements GraphQL subscriptions for Node.js