An API for publishing Author questionnaires.
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.
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.
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.
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.
yarn test
- Will run all tests.
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 |