Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions server/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import cors from 'cors';
import express, { type ErrorRequestHandler } from 'express';
import session from 'express-session';
import { buildContext, GraphQLLocalStrategy } from 'graphql-passport';
import depthLimit from 'graphql-depth-limit';
import helmet from 'helmet';
import passport from 'passport';
import { MultiSamlStrategy } from '@node-saml/passport-saml';
Expand Down Expand Up @@ -356,6 +357,7 @@ export default async function makeApiServer(deps: Dependencies) {
: ApolloServerPluginLandingPageGraphQLPlayground()),
},
],
validationRules: [depthLimit(10)],
introspection: process.env.NODE_ENV !== 'production',
formatError(e) {
// `e` can be an ApolloError instance, but will only be one if such an
Expand Down
85 changes: 70 additions & 15 deletions server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"fuzzball": "^2.1.2",
"generic-pool": "^3.8.2",
"graphql": "^16.0.1",
"graphql-depth-limit": "^1.1.0",
"graphql-passport": "^0.6.4",
"graphql-scalars": "^1.19.0",
"helmet": "^4.6.0",
Expand Down Expand Up @@ -122,6 +123,7 @@
"devDependencies": {
"@faker-js/faker": "^7.5.0",
"@types/cls-hooked": "^4.3.3",
"@types/graphql-depth-limit": "^1.1.6",
"@types/jest": "^29.2.4",
"@types/js-yaml": "^4.0.5",
"@types/stream-json": "^1.7.7",
Expand Down
Loading