@@ -165,7 +165,7 @@ function buildExecutionContext(
165
165
) : ExecutionContext {
166
166
const errors : Array < GraphQLError > = [];
167
167
let operation: ?OperationDefinition;
168
- const fragments: { [ name : string ] : FragmentDefinition } = { } ;
168
+ const fragments: { [ name : string ] : FragmentDefinition } = Object.create(null) ;
169
169
documentAST.definitions.forEach(definition => {
170
170
switch ( definition . kind ) {
171
171
case Kind . OPERATION_DEFINITION :
@@ -218,8 +218,8 @@ function executeOperation(
218
218
exeContext ,
219
219
type ,
220
220
operation . selectionSet ,
221
- { } ,
222
- { }
221
+ Object . create ( null ) ,
222
+ Object . create ( null )
223
223
) ;
224
224
225
225
if ( operation . operation === 'mutation' ) {
@@ -329,7 +329,7 @@ function executeFields(
329
329
}
330
330
return results ;
331
331
} ,
332
- { }
332
+ Object . create ( null )
333
333
) ;
334
334
335
335
// If there are no promises, we can just return the object
@@ -486,7 +486,7 @@ function promiseForObject<T>(
486
486
values => values . reduce ( ( resolvedObject , value , i ) => {
487
487
resolvedObject [ keys [ i ] ] = value ;
488
488
return resolvedObject ;
489
- } , { } )
489
+ } , Object . create ( null ) )
490
490
) ;
491
491
}
492
492
@@ -757,8 +757,8 @@ function completeValue(
757
757
}
758
758
759
759
// Collect sub-fields to execute to complete this value.
760
- let subFieldASTs = { } ;
761
- const visitedFragmentNames = { } ;
760
+ let subFieldASTs = Object.create(null) ;
761
+ const visitedFragmentNames = Object.create(null) ;
762
762
for (let i = 0; i < fieldASTs . length ; i ++ ) {
763
763
const selectionSet = fieldASTs [ i ] . selectionSet ;
764
764
if ( selectionSet ) {
0 commit comments