Skip to content

Commit bfe4383

Browse files
committed
introduce GroupedFieldSet type
1 parent d2d32c8 commit bfe4383

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,
@@ -433,7 +433,7 @@ function executeFieldsSerially(
433433
parentType: GraphQLObjectType,
434434
sourceValue: unknown,
435435
path: Path | undefined,
436-
fields: Map<string, FieldGroup>,
436+
fields: GroupedFieldSet,
437437
): PromiseOrValue<ObjMap<unknown>> {
438438
return promiseReduce(
439439
fields,

0 commit comments

Comments
 (0)