Architecture

Learner Model GQL follows a Microservices architecture style while leveraging GraphQL, the client-side of the project interacts with a single GraphQL API gateway, which orchestrates the different GraphQL microservices based on the request query.

Microservices diagram

Schema Stitching

The GraphQL services design and API gateway rely on schema stitching, using the GraphQL Tools library @graphql-tools/stitch.

Some critical designs to be followed to do the schema stitching are:

  • Every entity to be extended by more than a single service needs a unique "id" field
  • Every service that extends an entity needs a standardized query that accepts a list of ids and returns a list of the requested entities in the same order as the "ids" parameter. If any of the requested entities is not found, the query must fail.

Services

Current services

Ecosystem

All the services are currently made using TypeScript with Node.js, but there isn't any specific requirement for new services to be made the same way, new GraphQL services could be made with different ecosystems, like Go or Rust, and just work by following the mentioned design constraints of Schema Stitching.

Important libraries