graphql-live-query
microdiff
graphql-live-query | microdiff | |
---|---|---|
7 | 13 | |
434 | 3,483 | |
- | - | |
2.0 | 5.7 | |
6 days ago | about 1 month ago | |
TypeScript | JavaScript | |
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-live-query
-
GraphQL Live Queries with live directive
There are even more implementations of live queries available by now. e.g. https://github.com/samsarahq/thunder (go) or https://github.com/n1ru4l/graphql-live-query (JavaScript).
- Websocket with socket.io or GraphQL subscriptions
-
The fastest object diff library in JavaScript
Please compare with modern competitor: json-patch-plus https://github.com/n1ru4l/graphql-live-query/blob/main/packa...
-
The Stack #3
Also note that subscriptions are not the only way to do real time communications in GraphQL. There are also things like Live Queries with great libraries like this from Laurin which you can use
-
Need guidance on apollo subscription fallback
Last but not least, I also created a GraphQL over Socket.io (https://github.com/n1ru4l/graphql-live-query/tree/main/packages/socket-io-graphql-server) transport. I am using this in two smaller apps with a maximum of 10 concurrent users and did not encounter any issues with stale data yet. Maybe this might be somethign you are looking for.
-
How to maintain subsription websockets with authentication, while retaining the stateless nature that an API should have?
So after having tried to answer you questions (instead of just telling you to not use WebSockets, although that wasn't your question 🙃). I also wanted to point you to a "new" way of handling real-time data with GraphQL that I am experimenting one. https://github.com/n1ru4l/graphql-live-query
-
What is the performance loss with GraphQL mutations vs sending data over websockets in real-time apps?
There will always be an overhead for sending the mutations via a Post http request vs sending them over the already established WebSocket connection. graphql-ws is not only a subscription transport but can be used for any GraphQL operation including queries and mutations. In real-time applications I tend to use my own GraphQL over Socket.io transport (https://github.com/n1ru4l/graphql-live-query/tree/main/packages/socket-io-graphql-server)
microdiff
-
🚀 The Fast, Accurate, JavaScript Objects Diffing & Patching Library
Microdiff
- Microdiff 1.3.1 - Fast object and array diffing in JavaScript
-
Building the fastest object and array differ
In conclusion, Microdiff is the fastest diffing library because of its performance-focused architecture and the focus on 99% of cases, and Microdiff is still able to also use modern features and make it possible to use easily. If you are interested in Microdiff, check out the GitHub repo. I hope you have learned something from this, and thank you for reading.
-
The fastest object diff library in JavaScript
>Microdiff aims for working for 99% of use cases, instead of making every edge case work.[1]
That's fine, of course, but probably should be in the README.
[1] https://github.com/AsyncBanana/microdiff/issues/2#issuecomme...
- MicroDiff - The fastest object diff library in JavaScript (compatible with Typescript)
- I created the fastest object and array diff library in JavaScript
- I created the fastest object and array differ in JavaScript
- Optimized (<1kb) object and array diffing in JavaScript - Feedback needed
What are some alternatives?
laravel-echo-server - Socket.io server for Laravel Echo
jsondiffpatch - Diff & patch JavaScript objects
graphiql - GraphiQL & the GraphQL LSP Reference Ecosystem for building browser & IDE tools.
deep-object-diff - Deep diffs two objects, including nested structures of arrays and objects, and returns the difference. ❄️
federation - 🌐 Build and scale a single data graph across multiple services with Apollo's federation gateway.
noclip.website - A digital museum of video game levels
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.
js-diff-benchmarks - Benchmarks of JS object diffing libraries.
mercurius - Implement GraphQL servers and gateways with Fastify
symmetry - Sync objects by diffing and patching
graphql-multipart-request-spec - A spec for GraphQL multipart form requests (file uploads).
matcha - A caffeine driven, simplistic approach to benchmarking.