Skip to content

Latest commit

 

History

History
79 lines (52 loc) · 4.18 KB

File metadata and controls

79 lines (52 loc) · 4.18 KB

Datahost GraphQL

Prototype of a basic GraphQL catalog service.

Please see our usage guide for information on the rationale and how to query through this proof of concept service.

Builds

Our CircleCI instance runs the tests and deploys docker containers to our public GCP hosted container registry:

If the tests pass images are built and tagged with the following tags:

  • The name of the branch (branch name tags will be mutated to track passing CI builds from the branch)
  • The full commit sha of the passing build
  • The names of any commit tags (or a unique abreviated commit sha if there isn't one)

This means that the latest main version can be found at:

europe-west2-docker.pkg.dev/swirrl-devops-infrastructure-1/public/datahost-graphql:main

Deployment

We currently deploy the CI built containers to idp-graphql-prototype a GCP instance via a GCP container optimised image. This means we only need to ship containers and can avoid managing the O/S layer.

The deployed system currently uses the ONS beta's SPARQL endpoint.

Usage

To start the app locally:

clojure -M:run

Then visit http://localhost:8888/ide and enter a GraphQL query

e.g.

{
  endpoint(draftset_id: "https://beta.gss-data.org.uk/sparql") {
    catalog(id: "http://gss-data.org.uk/catalog/datasets") {
      id
      catalog_query(search_string: "trade services time") {
        datasets {
          id
          label
          publisher
        }
      }
    }
  }
}

Dev

Start a REPL and from the user namespace first run:

(dev)

Then use (start) and (reset) to start and restart the service against a local copy of static fixture data from the REPL.

reset will also reload changed namespaces.

To run tests, from this directory run:

$ clojure -X:test

License

Copyright © 2023 TPXimpact Ltd

Distributed under the Eclipse Public License version 1.0.