Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/execution/IncrementalPublisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
GraphQLFormattedError,
} from '../error/GraphQLError.js';

import type { GroupedFieldSet } from './collectFields.js';
import type { DeferUsage, GroupedFieldSet } from './collectFields.js';

interface IncrementalUpdate<TData = unknown, TExtensions = ObjMap<unknown>> {
pending: ReadonlyArray<PendingResult>;
Expand Down Expand Up @@ -786,6 +786,7 @@ export class DeferredGroupedFieldSetRecord {
/** @internal */
export class DeferredFragmentRecord {
path: ReadonlyArray<string | number>;
deferUsage: DeferUsage;
label: string | undefined;
id: string | undefined;
children: Set<SubsequentResultRecord>;
Expand All @@ -795,9 +796,10 @@ export class DeferredFragmentRecord {
pendingSent?: boolean;
_pending: Set<DeferredGroupedFieldSetRecord>;

constructor(opts: { path: Path | undefined; label: string | undefined }) {
constructor(opts: { path: Path | undefined; deferUsage: DeferUsage }) {
this.path = pathToArray(opts.path);
this.label = opts.label;
this.label = opts.deferUsage.label;
this.deferUsage = opts.deferUsage;
this.children = new Set();
this.filtered = false;
this.deferredGroupedFieldSetRecords = new Set();
Expand Down
Loading