@@ -78,7 +78,7 @@ function coerceVariableValues(
7878 inputs : { + [ variable : string ] : mixed , ... } ,
7979 onError : ( GraphQLError ) = > void ,
8080) : { [ variable : string ] : mixed , ... } {
81- const coercedValues = { } ;
81+ const coercedValues = Object . create ( null ) ;
8282 for ( const varDefNode of varDefNodes ) {
8383 const varName = varDefNode . variable . name . value ;
8484 const varType = typeFromAST ( schema , varDefNode . type ) ;
@@ -145,7 +145,7 @@ function coerceVariableValues(
145145 ) ;
146146 }
147147
148- return coercedValues ;
148+ return { ... coercedValues } ;
149149}
150150
151151/**
@@ -163,7 +163,7 @@ export function getArgumentValues(
163163 node : FieldNode | DirectiveNode ,
164164 variableValues ?: ?ObjMap < mixed > ,
165165) : { [ argument : string ] : mixed , ... } {
166- const coercedValues = { } ;
166+ const coercedValues = Object . create ( null ) ;
167167
168168 // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
169169 const argumentNodes = node . arguments ?? [ ] ;
@@ -230,7 +230,7 @@ export function getArgumentValues(
230230 }
231231 coercedValues [ name ] = coercedValue ;
232232 }
233- return coercedValues ;
233+ return { ... coercedValues } ;
234234}
235235
236236/**
0 commit comments