Skip to content

Commit

Permalink
fix: remove security vulnerability of exposing graph in production en…
Browse files Browse the repository at this point in the history
…vironment
  • Loading branch information
sahanatroam committed Nov 6, 2021
1 parent 30b4469 commit f0bc04e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/jsutils/didYouMean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ export function didYouMean(
firstArg: string | ReadonlyArray<string>,
secondArg?: ReadonlyArray<string>,
) {
if (process.ENV.NODE_ENV === 'production') {
return ''
};

const [subMessage, suggestionsArg] = secondArg
? [firstArg as string, secondArg]
: [undefined, firstArg as ReadonlyArray<string>];
Expand Down

0 comments on commit f0bc04e

Please sign in to comment.