Implementing ActiveQL
Architecture Overview

Architecture

Overview

ActiveQL is NodeJS application that translates a domain configuration into a GraphQL schema and resolvers that implement business logic in a configuratively way. It stores data in a datastore (this can be a database) and it connects to other APIs.

The following diagram shows an architectural overview of ActiveQL

Overview

Structure

A full fledged ActiveQL application consists of the following packages / modules.

Structure

GraphQL API / Express

The generated Schema and Resolvers are made available as a GraphQL API via a NodeJS application, using Express (opens in a new tab) and Apollo (opens in a new tab).

This can be used by any GraphQL client - restrictions in regards of accessing the API technical (e.g. API call limits, restricted client IPs) are out of concern of ActiveQL and should be handled on a custom level.

ActiveQL Foundation

This library includes the opinionated generation of a GraphOL API based on the definition of a domain definition and was largely influenced by Ruby-on-Rails (opens in a new tab). It uses the concept of Convention over configuration (opens in a new tab) and Don't repeat yourself (opens in a new tab).

It can be embedded in a NodeJS application and uses a typed configuration to easily express domain logic from which it creates

ActiveQL Admin UI

You can access the basic CRUD operations of your domain data via a generic Admin UI (build in Angular). This follows also the convention over configuration approach. You can use it right away but are able to customize nearly every aspect of it.

It is an Angular Module that uses a ActiveQL GraphQL API to create generic (often Admin) views and services to enable a human user to interact with your API - search, list, sort entries and create, update, delete operations etc.

Please check out the documentation for more information.

Technologies

Although you can use ActiveQL without deep knowledge of the underlying technologies - in fact ActiveQL's goal is exactly to enable you to fully concentrate on your business domain without the need to engage in technical details - you should be aware of the technologies:

NodeJS

ActiveQL consists of regular NodeJS (opens in a new tab) packages. You can add and use any NodeJS library in your application.

YAML, JSON, Javascript, Typescript

The configuration of your business domain can be done in

ExpressJS

Is uses Express (opens in a new tab) for the server part, so you can add any ExpressJS logic to your application easily. At runtime you have access to the Express application and the request / response objects.

Apollo

ActiveQL uses the Apollo Data Graph Platform (opens in a new tab) and the Apollo Server Express Middleware (opens in a new tab) to provide the GraphQL API server. At runtime you have access to it and can use it directly in your application.

Databases

ActiveQL has the concept of a datastore where application data are read from and written to and ships with two default implementations of a datastore connecting to

Other implementations using e.g. relational databases or even another API (e.g. REST) can be implemented.

Angular

ActiveQL includes an Angular (opens in a new tab) application that provides a generic Admin UI if you want to provide users with the possibility to access your business domain API via a generic web application.