graphql-subscriptions
graphql-js
Our great sponsors
graphql-subscriptions | graphql-js | |
---|---|---|
7 | 26 | |
1,578 | 19,916 | |
0.1% | 0.3% | |
4.6 | 7.4 | |
3 months ago | 7 days ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
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-subscriptions
-
three ways to deploy a serverless graphQL API
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
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
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?
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
There are also other solutions available: https://github.com/apollographql/graphql-subscriptions#pubsub-implementations
-
Build a chat app with GraphQL Subscriptions & TypeScript: Part 2
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
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
graphql-js
- Understanding TTFB Latency in DJango - Seems absurdly slow after DB optimizations even locally
-
Diving into Open-Source Development
To begin, I'm going to start with GraphQL. This repo is a JS-specific implementation for GraphQL, for which projects written in JS/TS can utilize to build an API for their web app. The reason why I chose this project is because I've always been intrigued by how GraphQl challenges the standard way of building an API, a.k.a REST APIs. I have very little knowledge about this project since I've never used it before at work or for my personal projects. I only have theoretical knowledge about it which I gained from watching YouTube videos. It also uses TypeScript which is fascinating because type safety is very important when building software considering it cleans out a lot of bugs early on before the software is shipped.
-
How to define schema once and have server code and client code typed? [Typescript]
When I asked this in StackOverflow over a year ago I reached the solution of using graphql + graphql-zeus.
-
Uncovering Frontend Data Aggregation: Our Encounter with BFF, GraphQL, and Hydration
In short, we chose not to pursue GraphQL due to some limitations with union types and a lack of support for maps. This is further detailed in this link: limitations.
-
Exploring the Most Commonly Used Folder Names in Popular NPM Packages
benchmarks: This directory contains benchmark tests that help measure the performance of the package's code, these tests can be are very useful when experimenting with performance optimizations, and to ensure no slowdowns are introduced between releases. Example from graphql.
-
Apollo federated graph is not presenting its schema to graphiql with fields sorted lexicographically
GraphiQL (and many other tools) relies on introspection query which AFAIK is not guaranteed to have any specific order (and many libs don't support it). Apollo Server is built on top of graphql-js and it relies on it for this functionality.
-
What are popular ORMs for Node.js?
GraphQL.js + Knex.js + knex-types (TypeScript generator for Knex)
-
Announcing GraphQL Yoga 2.0!
Yoga v2 supports some experimental GraphQL features such as @defer and @stream, allowing you to get a taste of the future of GraphQL (with compatible clients such as URQL).
-
11 JavaScript Examples to Source Code That Reveal Design Patterns In Use
Visitors are used for many reasons like extensibility, plugins, printing an entire schema somewhere, etc.
-
How not to learn GraphQL
support for @defer and @stream
What are some alternatives?
uWebSockets.js - μWebSockets for Node.js back-ends :metal:
mercurius - Implement GraphQL servers and gateways with Fastify
amplify-flutter - A declarative library with an easy-to-use interface for building Flutter applications on AWS.
graphql-jit - GraphQL execution using a JIT compiler
graphql-redis-subscriptions - A graphql subscriptions implementation using redis and apollo's 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.
fastify-websocket - basic websocket support for fastify
subscriptions-transport-ws - :arrows_clockwise: A WebSocket client + server for GraphQL subscriptions
graphql-code-generator - A tool for generating code based on a GraphQL schema and GraphQL operations (query/mutation/subscription), with flexible support for custom plugins.
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-shield - 🛡 A GraphQL tool to ease the creation of permission layer.