graphql-yoga VS graphql-subscriptions

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

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. (by prisma-labs)

graphql-subscriptions

:newspaper: A small module that implements GraphQL subscriptions for Node.js (by apollographql)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
graphql-yoga graphql-subscriptions
23 7
7,970 1,575
0.5% -0.1%
9.3 4.6
6 days ago 2 months ago
TypeScript 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-yoga

Posts with mentions or reviews of graphql-yoga. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-11-17.
  • Announcing GraphQL Yoga v3
    2 projects | dev.to | 17 Nov 2022
    We have migration guide try it out! We can't wait answer your questions and get your feedback on how we can make GraphQL Yoga even more better!
  • We built a database UI for Postgres with an instant GraphQL API
    2 projects | /r/vuejs | 27 Sep 2022
    It's easy to do with a Serverless Function and with GraphQL Yoga.
  • How to Build a Type-safe GraphQL API using Pothos and Kysely
    5 projects | dev.to | 29 Aug 2022
    In today's article we are going to create a GraphQL api using the Koa framework together with the GraphQL Yoga library and Pothos. In addition, we will use Kysely, which is a query builder entirely written in TypeScript.
  • End-to-end GraphQL error handling?
    3 projects | dev.to | 8 May 2022
    I want to share my approach to handling errors in GraphQL resolvers (I use GraphQL Yoga on the server-side) and pass them to the frontend side (where I use Svelte + @urql/svelte).
  • how it subscription work on the apollo server?
    3 projects | /r/graphql | 26 Apr 2022
    Last, in case you just want a simple GraphQL server where you don’t have to setup anything and subscriptions work out of the box (using SSE), you might wanna check out GraphQL Yoga v2 (Disclaimer: I am maintaining this library).
  • RedwoodJS Reaches 1.0 Today
    13 projects | news.ycombinator.com | 4 Apr 2022
    Not that I know of. But here are a few things that may be of interest.

    Redwood's GraphQL API is built on Yoga (we collaborate tightly with The Guild) — https://www.graphql-yoga.com You just need a GraphQL Client, which The Guild already has an option ready for you https://apollo-angular.com (Note: Apollo or other clients fine as well.)

    Here's an example "How To" about connecting Next (React) with Redwood: https://community.redwoodjs.com/t/how-to-connect-a-next-js-f...

    I'm a co-founder of Redwood and help lead the project so I can say as a matter of fact we a highly collaborative and enjoy (and support) exploratory projects. It's a priority for us to better demonstrate the power of Redwood's API through examples. If you'd be interested in digging in collaboratively with the community, I can help connect the dots. Just kick things off over here and tag me @thedavidprice: https://community.redwoodjs.com

    No pressure at all! Just wanted you to know the invitation is open. Anytime.

  • Announcing GraphQL Yoga 2.0!
    8 projects | /r/graphql | 29 Mar 2022
    We always appreciate contributions to our documentation! However, in such a case we would want a full end2end scenario, as we don't wanna recommend a setup that is not verified to work (see https://github.com/dotansimha/graphql-yoga/tree/master/e2e). If you want to champion this, let's move the discussion over to GitHub!
    8 projects | /r/graphql | 29 Mar 2022
    You can still use graphql-ws alongside graphql-yoga! We did not add recipes yet (it is in our backlog https://github.com/dotansimha/graphql-yoga/issues/932). I am curious what are your reasons for doing GraphQL over WebSocket instead of SSE?
    10 projects | dev.to | 29 Mar 2022
    We can't wait to get your questions, user feedback, and feature requests/PRs, and we already plan for new features such as an Enhanced Plugin System that will provide features similar to Envelop but at the request level.
  • GraphQL error handling to the max with Typescript, codegen and fp-ts
    11 projects | dev.to | 7 Mar 2022
    If you use Envelop or GraphQL Yoga (both developed by The Guild), you can already benefit from it today by using this Envelop plugin) :::

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-yoga and graphql-subscriptions you can also consider the following projects:

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 🧬

mercurius-typescript - TypeScript usage examples and "mercurius-codegen" for Mercurius

express-graphql - Create a GraphQL HTTP server with Express.

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

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

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

Next.js - The React Framework

blog-graphql-nestjs-fileupload - example code on how to upload a file with multipart requests to GraphQL in nestjs

apollo-studio-community - 🎡  GraphQL developer portal featuring an IDE (Apollo Explorer), auto-documentation, metrics reporting, and more. This repo is for issues, feature requests, and preview docs. 📬

fastify-websocket - basic websocket support for fastify

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