Aqls: A full-stack GraphQL subscription analytics module
Apollo, the industry-standard for GraphQL implementation, does not track traces for GraphQL subscriptions. Now we aren’t here to complain about Apollo, because it does a fantastic job at providing in-depth and valuable insights into what is going on under the hood in your GraphQL deployments. However, for all the analytics it does provide, it does not currently track subscription data.
No analytics === no optimization.
Our new npm suite Aqls solves this problem.
GraphQL Subscriptions
One of the most powerful and underused features of GraphQL is its ability to update data live without an end user needing to refresh their instance of the app. On the server side, it is a pretty simple process where the client submits a query to a subscription resolver to subscribe to any mutated data. A websocket connection is established, and the server’s pubsub (whether Redis, Google PubSub, RabbitMQ, or Kafka) adds the client to its async iterator and pushes the mutated payload to all subscribers whenever it receives one. This is all awesome, but if you want to complete A/B testing, you have no way of knowing whether your resolvers, schema, or app are optimized.
Enter Aqls
Developed under tech accelerator OS Labs and currently in Beta, Aqls is a lightweight GraphQL subscription analytics module.
It offers a simple monitoring dashboard to help analyze your app during development to enable better design, schema, and query decisions.
Split into 2 modules, Aqls integrates custom React hooks with Apollo Client and a self-auditing analytics/error routing system with Apollo Server Express. It is an easy-to-use analytics suite that monitors GraphQL subscriptions concurrency, latency, errors, and resolver frequency.
Using Aqls
The dashboard and its analytics are available by installing the Aqls-client and Aqls-server packages. By creating an account on www.Aqls.io, you can generate a key that will be implemented in the server-side setup of your application.
After installing Aqls into your app, our hooks and server plugins will track the round-trip latency of the subscription. If not all subscription data is returned successfully, or a subscriber’s client is taking too long to respond, the Aqls dashboard will display it in its error log.
Aqls is currently in BETA and the Aqls team will continue to implement further improvements and features. If you would like to contribute to our app or encounter any issues while using it, please submit a PR to our Github.
Aqls Org is a team composed of Rocio Infante, Michael O’Halloran, Julie Pinchak, and Case Simmons.
Aqls-server GitHub: https://github.com/oslabs-beta/Aqls-server
Aqls-client GitHub: https://github.com/oslabs-beta/Aqls-client