diff --git a/api.graphql b/api.graphql index 77d1a27..edfe77e 100644 --- a/api.graphql +++ b/api.graphql @@ -62,7 +62,7 @@ type TagState { # Date when the attendee was checked in checked_in_date: String # The username of the admin that checked the attendee in - checked_in_by: String + checked_in_by: String! } # NOTE: Type names that forward to registration must match the type names diff --git a/build.sh b/build.sh index 22774ea..0900893 100755 --- a/build.sh +++ b/build.sh @@ -20,9 +20,18 @@ curl -s 'https://raw.githubusercontent.com/HackGT/registration/master/api.graphq ./node_modules/.bin/graphql-typewriter -i ./api.graphql mv ./api.graphql.types.ts ./server/graphql.types.ts +# Generate types for client side queries and responses +./node_modules/.bin/apollo-codegen introspect-schema \ + ./api.graphql \ + --output ./apis/checkin.schema.json +./node_modules/.bin/gql2ts \ + -o ./apis/checkin.d.ts \ + ./apis/checkin.schema.json + # Compile ./node_modules/typescript/bin/tsc -p server/ ./node_modules/typescript/bin/tsc -p client/ +./node_modules/typescript/bin/tsc -p test/ # Bundle client side js ./node_modules/.bin/browserify ./client/js/main.js -o ./client/js/bundle.js \ No newline at end of file diff --git a/client/index.html b/client/index.html index dcf8a8c..33940e6 100644 --- a/client/index.html +++ b/client/index.html @@ -44,23 +44,10 @@