Skip to content

Commit

Permalink
embed graphql schema in bundle and hot reload (#40)
Browse files Browse the repository at this point in the history
* remove schemas

* add docs

* load graphql schema from bundle

* regenerate the schema on reload

* catch error if bundle is malformed on reload

* fix tests

* fix typo

* explain dirs in a better way

* improve legibility
  • Loading branch information
jmelis authored Mar 18, 2019
1 parent de6766b commit 313ebe5
Show file tree
Hide file tree
Showing 28 changed files with 2,442 additions and 1,435 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,18 @@ The bundles are required to run the validation and to start the server.
mkdir -p $BUNDLES_DIR
docker run --rm \
-v $SCHEMAS_DIR:/schemas:z \
-v $GRAPHQL_SCHEMA_DIR:/graphql:z \
-v $DATA_DIR:/data:z \
-v $RESOURCES_DIR:/resources:z \
quay.io/app-sre/qontract-validator:latest \
qontract-bundler /schemas /data /resources > $BUNDLES_DIR/bundle.json
qontract-bundler /schemas /graphql/schema.yml /data /resources > $BUNDLES_DIR/bundle.json
```

* `SCHEMAS_DIR` - `assets/schemas/` dir in the `qontract-server` git repository
* in the future it will be removed from this repository
* `DATA_DIR` - `/data` dir in the `app-interface` git repository
* `RESOURCES_DIR` - `/resources` dir in the `app-interface` git repository
* `$BUNDLES_DIR` - a directory that will contain the created `bundle.json` file
* `SCHEMAS_DIR` - dir that contains the JSON schemas (this is not used by this server).
* `GRAPHQL_SCHEMA_DIR` - dir that contains the file `schema.yml` representing the GraphQL schema.
* `DATA_DIR` - dir that contains the datafiles.
* `RESOURCES_DIR` - dir that contains the resources.
* `$BUNDLES_DIR` - a directory that will contain the created `bundle.json` file.

## Validating the bundle

Expand Down
Loading

0 comments on commit 313ebe5

Please sign in to comment.