This repository contains the Kosmos application framework.
See architecture documentation.
Pre-requisites
docker
pip
terraform / tflocal wrapper
To run kosmos locally and kick off tests
npm install
cd gremlin
docker compose up -d
cd ../
cd terraform
terraform init
terraform apply --auto-approve
cd ../
npm run debugger
another window: npm run kosmostests
To run Kosmos with a different directory to the default use
npm run start_directory --dir=<DIRECTORY>
A full list of available traits may be found at Trait class documentation page.
TODO
It is possible to use Apollo Tracing for analysing performance / timeline of GraphQL queries.
To enable it, add the following to your application's config.yml:
graphQlTracing: true
IMPORTANT NOTE: Like virtually any debugging tool, Apollo Tracing could harm performance of queries and should be only used during development.
To debug gremlin query use DEBUG_GREMLIN. To log errors with a stack trace use DEBUG_ERROR_TRACE.
When the logging is enabled for the first time it will throw an error about not having the correct permissions. The fix for this is to enable logging on the gateway manually then redeploy the stack. For some reason you need to manually enable it for the account to flag that logging is allowed.
To generate HTML documentation from the code, run:
npm run docs
Inline code documentation is using TypeDoc format. The generator supports following features:
The Trait documentation should include:
Good examples are SearchTrait, FileUrlTrait and MembershipTrait.
After updating README, run the following command to update table of contents:
npm run toc
Generated using TypeDoc