@@ -142,7 +142,7 @@ export interface ExecutionArgs {
142
142
}
143
143
144
144
/**
145
- * Implements the "Evaluating requests" section of the GraphQL specification.
145
+ * Implements the "Executing requests" section of the GraphQL specification.
146
146
*
147
147
* Returns either a synchronous ExecutionResult (if all encountered resolvers
148
148
* are synchronous), or a Promise of an ExecutionResult that will eventually be
@@ -196,7 +196,7 @@ export function execute(args: ExecutionArgs): PromiseOrValue<ExecutionResult> {
196
196
}
197
197
198
198
/**
199
- * Also implements the "Evaluating requests" section of the GraphQL specification.
199
+ * Also implements the "Executing requests" section of the GraphQL specification.
200
200
* However, it guarantees to complete synchronously (or throw an error) assuming
201
201
* that all field resolvers are also synchronous.
202
202
*/
@@ -327,7 +327,7 @@ export function buildExecutionContext(
327
327
}
328
328
329
329
/**
330
- * Implements the "Evaluating operations" section of the spec.
330
+ * Implements the "Executing operations" section of the spec.
331
331
*/
332
332
function executeOperation (
333
333
exeContext : ExecutionContext ,
@@ -367,8 +367,8 @@ function executeOperation(
367
367
}
368
368
369
369
/**
370
- * Implements the "Evaluating selection sets" section of the spec
371
- * for "write" mode .
370
+ * Implements the "Executing selection sets" section of the spec
371
+ * for fields that must be executed serially .
372
372
*/
373
373
function executeFieldsSerially (
374
374
exeContext : ExecutionContext ,
@@ -381,7 +381,7 @@ function executeFieldsSerially(
381
381
fields . entries ( ) ,
382
382
( results , [ responseName , fieldNodes ] ) => {
383
383
const fieldPath = addPath ( path , responseName , parentType . name ) ;
384
- const result = resolveField (
384
+ const result = executeField (
385
385
exeContext ,
386
386
parentType ,
387
387
sourceValue ,
@@ -405,8 +405,8 @@ function executeFieldsSerially(
405
405
}
406
406
407
407
/**
408
- * Implements the "Evaluating selection sets" section of the spec
409
- * for "read" mode .
408
+ * Implements the "Executing selection sets" section of the spec
409
+ * for fields that may be executed in parallel .
410
410
*/
411
411
function executeFields (
412
412
exeContext : ExecutionContext ,
@@ -420,7 +420,7 @@ function executeFields(
420
420
421
421
for ( const [ responseName , fieldNodes ] of fields . entries ( ) ) {
422
422
const fieldPath = addPath ( path , responseName , parentType . name ) ;
423
- const result = resolveField (
423
+ const result = executeField (
424
424
exeContext ,
425
425
parentType ,
426
426
sourceValue ,
@@ -583,12 +583,12 @@ function getFieldEntryKey(node: FieldNode): string {
583
583
}
584
584
585
585
/**
586
- * Resolves the field on the given source object. In particular, this
587
- * figures out the value that the field returns by calling its resolve function,
588
- * then calls completeValue to complete promises, serialize scalars, or execute
589
- * the sub-selection-set for objects.
586
+ * Implements the "Executing field" section of the spec
587
+ * In particular, this function figures out the value that the field returns by
588
+ * calling its resolve function, then calls completeValue to complete promises,
589
+ * serialize scalars, or execute the sub-selection-set for objects.
590
590
*/
591
- function resolveField (
591
+ function executeField (
592
592
exeContext : ExecutionContext ,
593
593
parentType : GraphQLObjectType ,
594
594
source : unknown ,
@@ -722,7 +722,7 @@ function handleFieldError(
722
722
* and then complete based on that type
723
723
*
724
724
* Otherwise, the field type expects a sub-selection set, and will complete the
725
- * value by evaluating all sub-selections.
725
+ * value by executing all sub-selections.
726
726
*/
727
727
function completeValue (
728
728
exeContext : ExecutionContext ,
0 commit comments