Work towards exposing the Discovery Environment data model through GraphQL using Apollo Server.
You'll want the following installed to work on this:
node
/npm
to install dependencies and run the service.kubectl
to forward ports to services running in the DE's clusters.docker
if you're going to build images locally.
de-graphql uses the following environment variables for configuration:
APPS_URL
- The base URL to the DE's apps service.GATEWAY
- The base URL to the OpenFaaS gateway serving up the de-functions functions.PERMISSIONS_URL
- The base URL to the DE's permissions service.USER_INFO_URL
- The base URL to the DE's user-info service.METADATA_DB_URL
- The connection string for the DE's metadata database.DE_DB_URL
- The connection string for the DE's de-db database.
The METADATA_DB_URL
should look like postgres://<user>:<password>@<hostname>:<port>/metadata/sslmode=disable
.
The DE_DB_URL
should look like postgres://<user>:<password>@<hostname>:<port>/de?sslmode=disable
.
To start it locally, run npm install
and then node src/index.js
with the above environment variables set in the top-level of the repository.
Run docker build --rm -t <image> .
in the top-level directory of the respository. Push the image like any other Docker image.