-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
This file was deleted.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,10 @@ const emitSchemaFileOptions: EmitSchemaFileOptions = { | |
path: path.resolve(process.cwd(), './tmp/schema.gql'), | ||
}; | ||
|
||
// [email protected] で forbidUnknownValues がデフォルトで true になったため、false を設定するようにする処理。 | ||
// https://github.com/typestack/class-validator/blob/develop/CHANGELOG.md#0140-2022-12-09 | ||
const validate: BuildSchemaOptions['validate'] = { forbidUnknownValues: false }; | ||
|
||
export const buildSchema = | ||
(serverConfig: ServerConfig | typeof noAuthCheck) => | ||
async (options: Options): Promise<GraphQLSchema> => { | ||
|
@@ -68,6 +72,7 @@ export const buildSchema = | |
authChecker: authChecker(serverConfig), | ||
emitSchemaFile, | ||
pubSub: options.pubSub, | ||
validate, | ||
}); | ||
}; | ||
|
||
|
@@ -84,5 +89,6 @@ export const buildSchemaSync = | |
authChecker: authChecker(serverConfig), | ||
emitSchemaFile, | ||
pubSub: options.pubSub, | ||
validate, | ||
}); | ||
}; |