Skip to content

Files

Latest commit

f2f577b · Aug 10, 2022

History

History

eq-publisher

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jun 14, 2021
Aug 10, 2022
Nov 12, 2018
Nov 12, 2018
Apr 18, 2019
Nov 16, 2018
Nov 12, 2018
Dec 15, 2021
Jul 17, 2019
Aug 20, 2019
Jun 11, 2019
Dec 13, 2021
Dec 13, 2021

eq-publisher

An API for publishing Author questionnaires.

Overview

The conversion between the GraphQL JSON output and the EQ runner schema can be thought of as a pipeline.

The conversion pipeline is made up of a series of steps to convert each part of the GraphQL JSON.

Each step applies a series of transforms to manipulate the resulting JSON.

The final validate process is passed on to eq-schema-validator.

eq-publisher process

Running

Running with Docker Compose

For convenience, a docker-compose.yml configuration is supplied with this project. The compose file orchestrates the Publisher application and the EQ schema validation service. A benefit of this approach is that there is no need to run the schema validation service manually.

From a terminal open the eq-publisher folder and run

docker-compose up --build

The --build flag is only required on the first run.

Running with Yarn

Note that some environment variables may be necessary to run the service in isolation.

yarn install - Will install dependencies.

yarn start - Will start the application.

Environment Variables

The following environment variables can be configured.

Name Description Required
EQ_SCHEMA_VALIDATOR_URL The URL of the schema validation service. See Running with Docker Compose Yes
EQ_AUTHOR_API_URL The URL of the GraphQL API server Yes
EQ_PUBLISHER_VERSION The current Publisher version. This is what gets reported on the /status endpoint No

Note that some Environment Variables may be necessary to run the service in isolation. The following environment variables can be configured.

Running tests

yarn test - Will run all tests.

Routes

By default, the express server will bind to port 9000.

You can then navigate to http://localhost:9000.

Since the API is still under active development, there are only two routes at present:

Route Description
/graphql/:questionaireId Demonstrates the JSON that is output by the Author API
/publish/:questionaireId Demonstrates the published EQ JSON