schema: add a script to re-export the schema

This commit is contained in:
Valentin Tolmer 2021-09-01 10:01:08 +02:00 committed by nitnelave
parent 2954109d96
commit 6ef06163db
2 changed files with 6 additions and 1 deletions

View file

@ -24,7 +24,7 @@ jobs:
- name: Generate GraphQL schema - name: Generate GraphQL schema
run: cargo run -- export_graphql_schema -o generated_schema.graphql run: cargo run -- export_graphql_schema -o generated_schema.graphql
- name: Check schema - name: Check schema
run: diff schema.graphql generated_schema.graphql run: diff schema.graphql generated_schema.graphql || (echo "The schema file is out of date. Please run `./export_schema.sh`" && false)
clippy: clippy:

5
export_schema.sh Executable file
View file

@ -0,0 +1,5 @@
#! /bin/sh
cd $(dirname $(readlink -f "$0"))
cargo run -- export_graphql_schema -o schema.graphql