Skip to content

Commit f0bc04e

Browse files
authored
fix: remove security vulnerability of exposing graph in production environment
1 parent 30b4469 commit f0bc04e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/jsutils/didYouMean.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ export function didYouMean(
1212
firstArg: string | ReadonlyArray<string>,
1313
secondArg?: ReadonlyArray<string>,
1414
) {
15+
if (process.ENV.NODE_ENV === 'production') {
16+
return ''
17+
};
18+
1519
const [subMessage, suggestionsArg] = secondArg
1620
? [firstArg as string, secondArg]
1721
: [undefined, firstArg as ReadonlyArray<string>];

0 commit comments

Comments
 (0)