get rid of vunlerabilities, use type-graphql next

This commit is contained in:
Moriz Wahl 2023-12-05 19:09:18 +01:00
parent 90d1657ed1
commit 7c838d598e
3 changed files with 760 additions and 2664 deletions

3412
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -27,11 +27,10 @@
}, },
"dependencies": { "dependencies": {
"apollo-server-express": "^3.13.0", "apollo-server-express": "^3.13.0",
"graphql": "^15.3.0", "graphql": "^16.8.1",
"mysql2": "^3.6.5", "graphql-scalars": "^1.22.4",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
"type-graphql": "^1.1.1", "type-graphql": "^2.0.0-beta.3"
"typeorm": "^0.3.17"
}, },
"devDependencies": { "devDependencies": {
"@eslint-community/eslint-plugin-eslint-comments": "^4.1.0", "@eslint-community/eslint-plugin-eslint-comments": "^4.1.0",
@ -40,7 +39,6 @@
"@types/node": "^20.10.1", "@types/node": "^20.10.1",
"@typescript-eslint/eslint-plugin": "^6.13.1", "@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1", "@typescript-eslint/parser": "^6.13.1",
"apollo-server-testing": "^2.20.0",
"eslint": "^8.54.0", "eslint": "^8.54.0",
"eslint-config-prettier": "^9.0.0", "eslint-config-prettier": "^9.0.0",
"eslint-config-standard": "^17.1.0", "eslint-config-standard": "^17.1.0",

View File

@ -3,9 +3,11 @@ import path from 'path'
import { GraphQLSchema } from 'graphql' import { GraphQLSchema } from 'graphql'
import { buildSchema } from 'type-graphql' import { buildSchema } from 'type-graphql'
import { HelloResolver } from './resolvers/HelloResolver'
export const schema = async (): Promise<GraphQLSchema> => { export const schema = async (): Promise<GraphQLSchema> => {
return buildSchema({ return buildSchema({
resolvers: [path.join(__dirname, 'resolvers', `!(*.spec).{ts,js}`)], resolvers: [HelloResolver],
validate: { validate: {
validationError: { target: false }, validationError: { target: false },
skipMissingProperties: true, skipMissingProperties: true,