All Projects → oslabs-beta → Aqls Server

oslabs-beta / Aqls Server

Licence: mit
An intelligent full-stack GraphQL subscription and analytics module. Server-side analytics processing, self-auditing router, and resolver plugins.

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Aqls Server

Client Side Graphql
Stars: ✭ 119 (-4.8%)
Mutual labels:  graphql
React Graphql Github Apollo
🚀 A React + Apollo + GraphQL GitHub Client. Your opportunity to learn about these technologies in a real world application.
Stars: ✭ 1,563 (+1150.4%)
Mutual labels:  graphql
Lacinia
GraphQL implementation in pure Clojure
Stars: ✭ 1,649 (+1219.2%)
Mutual labels:  graphql
Graphene Gae
GraphQL Support for Google AppEngine [DEPRECATED - Looking for maintainers]
Stars: ✭ 119 (-4.8%)
Mutual labels:  graphql
Graphql Mode
An Emacs mode for GraphQL
Stars: ✭ 120 (-4%)
Mutual labels:  graphql
Springboot Restful Angular
springBoot,restful,jwt,angular4 搭建的前后端分离后台管理系统
Stars: ✭ 121 (-3.2%)
Mutual labels:  graphql
Server
Framework NodeJS for GraphQl
Stars: ✭ 118 (-5.6%)
Mutual labels:  graphql
Apollo upload server Ruby
Stars: ✭ 124 (-0.8%)
Mutual labels:  graphql
Netcoreblockly
.NET Core API to Blockly - generate from WebAPI, Swagger, OData, GraphQL =>
Stars: ✭ 121 (-3.2%)
Mutual labels:  graphql
Onesubscribe
ss ssr v2ray 订阅管理 node 后端
Stars: ✭ 122 (-2.4%)
Mutual labels:  graphql
Wp Graphql Yoast Seo
This is an extension to the WPGraphQL plugin for Yoast SEO
Stars: ✭ 120 (-4%)
Mutual labels:  graphql
Hypergraphql
GraphQL interface for querying and serving linked data on the Web.
Stars: ✭ 120 (-4%)
Mutual labels:  graphql
Graphql Typed Document Node
An improved version of `DocumentNode` for seamless TypeScript integration for GraphQL.
Stars: ✭ 122 (-2.4%)
Mutual labels:  graphql
Shio
✨ :dna: Shio CMS - Model Content, Use GraphQL and Create Site using Javascript with Native Cache and Search.
Stars: ✭ 119 (-4.8%)
Mutual labels:  graphql
Hackatalk
TalkTalk renewal. Open source chat app built-in expo managed work flow
Stars: ✭ 123 (-1.6%)
Mutual labels:  graphql
Awesome Angular Graphql
A curated collection of resources, clients and tools that make working with `GraphQL and Angular` awesome
Stars: ✭ 119 (-4.8%)
Mutual labels:  graphql
Deploy Strapi On Aws
Deploying a Strapi API on AWS (EC2 & RDS & S3)
Stars: ✭ 121 (-3.2%)
Mutual labels:  graphql
Graphql Serverless
GraphQL (incl. a GraphiQL interface) middleware for the webfunc serverless web framework.
Stars: ✭ 124 (-0.8%)
Mutual labels:  graphql
Api
🚀 GraphQL & REST APIs to explore all the rockets, launches & other SpaceX's data
Stars: ✭ 123 (-1.6%)
Mutual labels:  graphql
Gql
Libraries supporting GraphQL in Dart
Stars: ✭ 122 (-2.4%)
Mutual labels:  graphql

Aqls - Server

Overview

GraphQL analytics toolkit and dashboard that integrate with Apollo Client and Apollo Server Express. It is an easy to use analytics suite that monitors GraphQL subscriptions concurrency, latency, errors, and resolver frequency. Our integrated dashboard displays your GraphQL analytics on dynamic and interactive charts.

This package is for setting up your server. For the client-side package please refer to the Aqls-client package.

Note: Aqls is currently in BETA and improvements will continue to be implemented. If any issues are encountered while using our application, please submit a PR.

Requirements

  • Node.js version 12.18.3+
  • apollo-server-express version 2.18.1+

Install

With npm:

npm install --save @aqls/server

Getting Started

  • [ ] 1. Import Traql, traqlAudit, and analyticsRouter into your server file:
const { Traql, traqlAudit, analyticsRouter } = require('@aqls/server');

  • [ ] 2. Initialize a constant for your resolvers:
const resolvers = { Mutation, Query, Subscription };

  • [ ] 3. Create a new instance of Traql passing in the resolvers and your user token:
const traql = new Traql(resolvers, 'INSERT USER TOKEN HERE IN QUOTES');

This will keep track of the number of subscription resolvers in the system and will calculate the number of current subscribers. You can get your User Token from Aqls.io by signing up through Github OAuth. This token is needed to view your analytics in the developer dashboard at Aqls.io.

  • [ ] 4. Add to your Apollo Server:
const server = new ApolloServer({
  typeDefs,
  resolvers,
  context: { db, pubsub, traql },
});

Make sure that context is added to your server. Be sure to pass in BOTH pubsub and traql to server context.

  • [ ] 5. Invoke the traqlAudit function passing in traql:
setInterval(() => traqlAudit(traql), 5000);

traqlAudit is invoked every 5 seconds to audit each traql entry and ensure that there are no errors before sending the data to be displayed on the dashboard.

  • [ ] 6. Instantiate an endpoint to send analytics to Aqls server:
app.use('/aqlsanalytics', analyticsRouter(traql));

Note: Please ensure the endpoint is '/aqlsanalytics' and invoke analyticsRouter passing in traql.

Update Schema and Mutation Tracking

  • [ ] 1. Add AQL and AQLInput to schema file:
type AQL {
  mutationSendTime: String,
  mutationReceived: String,
  subscriberReceived: String,
  mutationId: ID,
  resolver: String,
  userToken: String,
}
input AQLInput {
  mutationSendTime: String,
  mutationReceived: String,
  subscriberReceived: String,
  mutationId: ID,
  resolver: String,
  userToken: String,
}

  • [ ] 2. Add AQLInput type to any mutation type that you want to track:
type Mutation {
  newColor(colorArg: String, aql: AQLInput): Color
  newLuckyNumber(numberArg: Int, aql: AQLInput): LuckyNumber
}

  • [ ] 3. Add AQL type to any payload that you want to track:
type UpdatedColorPayload {
  cssColor: String!
  id: ID!
  aql: AQL
}

Mutation Tracking

  • [ ] 1. Import newAqlPayload in mutation resolver file:
const { newAqlPayload } = require('@aqls/server');
  • [ ] 2. Pass invocation of newAqlPayload to pubsub publish property:
function newColor(parent, args, { db, pubsub, traql }, info) {
  db.color.cssColor = args.colorArg;
  const payload = {
    updatedColor: {
      ...db.color,
    },
  };
  pubsub.publish('COLOR_MUTATED', newAqlPayload(payload, args, traql, pubsub));
  return db.color;
}

Note: Pass in payload as first argument, be sure to include resolver arguments and the traql and pubsub from server context.

  • [ ] Lastly, Connect with the Aqls Team!

[email protected]

Case Simmons: Case's Github and Case's LinkedIn

Julie Pinchak: Julie's Github and Julie's LinkedIn

Michael O'Halloran: Michael's Github and Michael's LinkedIn

Rocio Infante: Rocio's Github and Rocio's LinkedIn

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].