-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix scripts, broken code and add command to ensure gql schema
- houdini would crash on build if no schema was present, which makes sense : the init script now has a graphql section where if the api is not generated (and by extension the schema), it runs the schema generation if the `--no-gql` arg is not present - few script enhancements : - progresser function to have a neat way of displaying progress, done status, and time took - args are clearly defined now - rawArgs are also available - removed gulp-typescript, as it added a whole dep for basically only a fancy way of getting `'./dist'` which will never change anyway
- Loading branch information
Showing
19 changed files
with
171 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import 'reflect-metadata'; | ||
|
||
import { ensureGraphQLSchema } from './schema.manager'; | ||
|
||
ensureGraphQLSchema(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { schemaPath } from '$graphql/graphql.module'; | ||
import { NestFactory } from '@nestjs/core'; | ||
import { existsSync } from 'fs'; | ||
import { AppModule } from '~/app.module'; | ||
|
||
export async function ensureGraphQLSchema() { | ||
if (!existsSync(schemaPath)) { | ||
// If schema file doesn't exist, run app once to generate schema | ||
const tempGqlApp = await NestFactory.create(AppModule); | ||
|
||
await tempGqlApp.init(); | ||
await tempGqlApp.close(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,6 @@ | |
"node_modules", | ||
"tests", | ||
"dist", | ||
"**/*spec.ts", | ||
".graphqlrc.ts", | ||
"gulpfile.ts", | ||
"**/*.spec.ts", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.