Skip to content

Commit c1e57bb

Browse files
committed
introduce GroupedFieldSet type
1 parent b291e79 commit c1e57bb

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/execution/collectFields.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import { getDirectiveValues } from './values.js';
2424

2525
export type FieldGroup = ReadonlyArray<FieldNode>;
2626

27+
export type GroupedFieldSet = Map<string, FieldGroup>;
28+
2729
/**
2830
* Given a selectionSet, collects all of the fields and returns them.
2931
*

src/execution/execute.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import {
4646
import type { GraphQLSchema } from '../type/schema.js';
4747
import { assertValidSchema } from '../type/validate.js';
4848

49-
import type { FieldGroup } from './collectFields.js';
49+
import type { FieldGroup, GroupedFieldSet } from './collectFields.js';
5050
import {
5151
collectFields,
5252
collectSubfields as _collectSubfields,
@@ -394,7 +394,7 @@ function executeFieldsSerially(
394394
parentType: GraphQLObjectType,
395395
sourceValue: unknown,
396396
path: Path | undefined,
397-
fields: Map<string, FieldGroup>,
397+
fields: GroupedFieldSet,
398398
): PromiseOrValue<ObjMap<unknown>> {
399399
return promiseReduce(
400400
fields,

0 commit comments

Comments
 (0)