graphql-over-http VS graphql-subscriptions

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

graphql-over-http

Working draft of "GraphQL over HTTP" specification (by graphql)

graphql-subscriptions

:newspaper: A small module that implements GraphQL subscriptions for Node.js (by apollographql)
SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
graphql-over-http graphql-subscriptions
12 7
359 1,578
0.6% 0.2%
7.0 4.6
about 1 month ago 3 months ago
JavaScript TypeScript
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.

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).

graphql-subscriptions

Posts with mentions or reviews of graphql-subscriptions. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-10-04.
  • 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.
  • Subscriptions and Live Queries - Real Time with GraphQL
    5 projects | dev.to | 29 Jul 2021
    The most common used (but not best maintained) library for such a PubSub engine in the GraphQL context is graphql-subscriptions. There are also adapters available for more distributed systems (where all GraphQL API replicas must be notified about the event) e.g. over Redis.
  • GraphQL over WebSockets
    9 projects | dev.to | 29 Jul 2021
    During that work, we created and merged the reference implementation into graphql-js and created two supporting libraries: graphql-subscriptions and subscriptions-transport-ws. Here is a talk with deep dive into all the details.
  • Using useSWR as an alternative to Subscriptions?
    8 projects | /r/nextjs | 16 Jul 2021
    The Prisma / GraphQL-Yoga comes with Subscriptions, and this was the first thing I came across when my client asked for realtime updates. The implementation was quite difficult - took me a long time. Eventually, it was working locally, and in staging. However, when it came to the production environment, for some reason it just didn't work! This unfortunately ended up with a user losing an auction, which ultimately went to court etc.
  • GraphQL subscriptions not working consistently
    2 projects | /r/graphql | 17 May 2021
    There are also other solutions available: https://github.com/apollographql/graphql-subscriptions#pubsub-implementations
  • Build a chat app with GraphQL Subscriptions & TypeScript: Part 2
    4 projects | dev.to | 28 Feb 2021
    First, let's try to understand what PubSub is exactly. Apollo Server uses a publish-subscribe (pub/sub) model to track events that update subscriptions. The graphql-subscriptions library included in all apollo-server packages (including middleware integrations) provides a PubSub class as a basic in-memory event bus.
  • GraphQL the Simple Way, or: Don't Use Apollo
    8 projects | dev.to | 2 Sep 2020
    To add this, I can just expand the basic setup above. To do so, I do actually use a couple of small Apollo modules! Most can be picked and configured independently. For this case, graphql-subscriptions provides a little bit of pubsub logic that works within resolvers, and subscriptions-transport-ws integrates that into Express to handle the websockets themselves. Super helpful

What are some alternatives?

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

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

amplify-flutter - A declarative library with an easy-to-use interface for building Flutter applications on AWS.

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.

graphql-redis-subscriptions - A graphql subscriptions implementation using redis and apollo's graphql-subscriptions

redwood - The App Framework for Startups

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

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