graphql-live-query
apollo-server
| graphql-live-query | apollo-server | |
|---|---|---|
| 8 | 75 | |
| 442 | 13,935 | |
| 0.9% | 0.1% | |
| 0.0 | 8.7 | |
| 8 days ago | 5 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-live-query
- GraphQL Live Query, How To?
Is there an official production-ready solution for getting the 'Live Query' unofficial feature working? (I'm not talking about 'subscription')
I've found some [1] [2] [3], but they're either archived or not ready for production.
I want to register from my clients (frontend app) for specific (can be complex) queries and get updates on changes.
[1] https://github.com/n1ru4l/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)
apollo-server
- GraphQL API Design: Powerful Practices to Delight Developers
Apollo Server is the go-to solution for building GraphQL servers in JavaScript:
- The Power of GraphQL: A Beginnerās Guide to Modern Web Development
Tip: If you're just starting with GraphQL, consider using tools like Apollo Server or Relay to make the setup and development process easier.
- From REST to GraphQL: Why and How I Made the Switch
Apollo Server Guide
- 10 Reasons TypeScript is Transforming How We Build Web Apps
Apollo Server Documentation: https://www.apollographql.com/docs/apollo-server/
- NestJS Authentication with OAuth2.0: Adding Mobile Apps Support
Apollo GraphQL API.
- Getting Started with GraphQL
Step 2: Install dependencies Next, install Apollo Server and GraphQL:
- Understanding AML/KYC: a light primer for engineers
APIs are often the key to enabling interoperability between AML/KYC solutions and other systems. Design APIs following RESTful principlesāusing libraries like ExpressJs (JavaScript), Flask (Python), or Actix Web (Rust)āensuring they are stateless and support the JSON/XML formats expected by most systems. Use Swagger to generate detailed documentation for RESTful APIs to facilitate integration and ensure your APIs are easily consumable by other systems. If youāre building GraphQL APIs, using tools like Apollo Server, Prisma, or Graphene will allow for self-documenting APIs (through GraphQL introspection).
- Using GraphQL with Node.js (e.g., Apollo Server)
Feel free to check out the official documentation of Apollo Server and GraphQL for more detailed information on advanced topics and best practices. Happy coding!
- When Itās Time to Give REST a Rest
Since my skills with GraphQL arenāt polished, I decided to go with Apollo Server for this article.
- React Server Components Example with Next.js
Another interesting point is that executing fetches on the server can allow developers to more easily leverage caching. Next.js already handles caching out-of-the-box and Iām curious to see if the wider adoption of RSC reduces the need to combine React with solutions like Apollo Server and Apollo Client. While there are other benefits to these tools, RSC could provide similar caching behavior without the need to invest in a GraphQL solution.
What are some alternatives?
apollo-tooling - āļø Apollo CLI for client tooling (Mostly replaced by Rover)
mercurius - Implement GraphQL servers and gateways with Fastify
federation - š Ā Build and scale a single data graph across multiple services with Apollo's federation gateway.
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-multipart-request-spec - A spec for GraphQL multipart form requests (file uploads).
graphql-ws - Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client.