graphql-subscriptions
amplify-js
Our great sponsors
graphql-subscriptions | amplify-js | |
---|---|---|
7 | 42 | |
1,577 | 9,361 | |
0.0% | 0.1% | |
4.6 | 9.9 | |
3 months ago | 3 days ago | |
TypeScript | TypeScript | |
MIT License | Apache License 2.0 |
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
amplify-js
-
In Defense of Cognito
One note of caution, though: Amplify uses a frontend-only Cognito integration that stores long-lived, never-rotating refresh tokens in browser storage, where any XSS vulnerability would have access to them. A more secure approach is to implement a couple of backend API routes to store the refresh tokens in `HttpOnly` cookies instead, which I outlined here (option 1 in your case to support SSO). I'll probably open source a solution to do this early next year so we don't all have to keep reinventing this wheel (probably why AWS calls their conference re:invent).
-
Auth0 increases price by 300%
I'm ramosbugs on GitHub (that comment is mine). If you subscribe to https://github.com/aws-amplify/amplify-js/issues/1218 I'll post a comment there once I release a solution.
-
Server-Side Rendering with AWS Amplify
Amplify also lets you host a backend, which it runs in Lambda functions. You don't have a lot of control over it, but it works well for its intended audience: People who wouldn't know what to do if they had a lot of control over their Lambda functions. Amplify also lets you consume other AWS services easily, through declarative and easy-to-use libraries. That way, you can consume Cognito or S3 from the frontend without knowing a lot about Cognito or S3. Here's the complete list of libraries for Amplify, and you can check the Readme of the JavaScript one as an example of its features.
-
React Native Storage.put() results in error
Whenever I call Storage.put() inside my React Native (with Expo) application, I get an error of [TypeError: undefined is not a function]. Doing some internet digging, after hours of searching, I found only one other reference to this kind of error, and that is with the DataStore: https://github.com/aws-amplify/amplify-js/issues/10764
- How was you experience with nextJS using SSR in amplify?
-
SRP_A error when trying Custom Auth Passwordless flow
Hello! Can you please create a GitHub issue here for us to investigate this further? https://github.com/aws-amplify/amplify-js/issues
-
Cookies vs local storage - what to use when?
Thanks for bringing this up. This discussion on the project's github is equally insightful on the subject.
-
Understanding ID Token vs. Access Token in AWS Amplify
Amplify GitHub Issue
-
The Amplify Series, Part 6: Using the power of AI and Machine Learning with Amplify Predictions
Bug: There is currently, at the time of writing, a bug in Amplify that does not allow us to use the voiceId “Kevin”, which we selected when creating the backend resources. Selecting the voiceId “Amy” works, so we will use that.
- RFC: Amplify JS TypeScript Improvements
What are some alternatives?
uWebSockets.js - μWebSockets for Node.js back-ends :metal:
microsoft-authentication-library-for-js - Microsoft Authentication Library (MSAL) for JS
amplify-flutter - A declarative library with an easy-to-use interface for building Flutter applications on AWS.
passwordless-auth - Allows a user to login directly via email without a need for entering passwords using Cognito
graphql-redis-subscriptions - A graphql subscriptions implementation using redis and apollo's graphql-subscriptions
Rollup - Next-generation ES module bundler
fastify-websocket - basic websocket support for fastify
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.
subscriptions-transport-ws - :arrows_clockwise: A WebSocket client + server for GraphQL subscriptions
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.
AWS - AWS SDK for iOS. For more information, see our web site: