File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ export function getArgumentValues(
206206 fragmentVariableValues ?: Maybe < FragmentVariableValues > ,
207207 hideSuggestions ?: Maybe < boolean > ,
208208) : { [ argument : string ] : unknown } {
209- const coercedValues : { [ argument : string ] : unknown } = { } ;
209+ const coercedValues : { [ argument : string ] : unknown } = Object . create ( null ) ;
210210
211211 const argumentNodes = node . arguments ?? [ ] ;
212212 const argNodeMap = new Map ( argumentNodes . map ( ( arg ) => [ arg . name . value , arg ] ) ) ;
@@ -224,7 +224,7 @@ export function getArgumentValues(
224224 hideSuggestions ,
225225 ) ;
226226 }
227- return coercedValues ;
227+ return { ... coercedValues } ;
228228}
229229
230230// eslint-disable-next-line max-params
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export function coerceInputValue(
6969 return ; // Invalid: intentionally return no value.
7070 }
7171
72- const coercedValue : any = { } ;
72+ const coercedValue : any = Object . create ( null ) ;
7373 const fieldDefs = type . getFields ( ) ;
7474 const hasUndefinedField = Object . keys ( inputValue ) . some (
7575 ( name ) => ! Object . hasOwn ( fieldDefs , name ) ,
@@ -109,7 +109,7 @@ export function coerceInputValue(
109109 }
110110 }
111111
112- return coercedValue ;
112+ return { ... coercedValue } ;
113113 }
114114
115115 const leafType = assertLeafType ( type ) ;
You can’t perform that action at this time.
0 commit comments