Skip to content

Commit

Permalink
Use spread initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
yaacovCR committed Oct 29, 2021
1 parent f52d0d0 commit fe36ffc
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions src/execution/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,18 @@ export class Executor {
exeContext: ExecutionContext,
returnType: GraphQLObjectType,
fieldNodes: ReadonlyArray<FieldNode>,
) =>
_collectSubfields(
exeContext.schema,
exeContext.fragments,
exeContext.variableValues,
) => {
const { schema, fragments, variableValues, disableIncremental } =
exeContext;
return _collectSubfields(
schema,
fragments,
variableValues,
returnType,
fieldNodes,
exeContext.disableIncremental,
),
disableIncremental,
);
},
);

/**
Expand Down Expand Up @@ -1468,8 +1471,14 @@ export class Executor {
async executeSubscriptionRootField(
exeContext: ExecutionContext,
): Promise<unknown> {
const { schema, fragments, operation, variableValues, rootValue, disableIncremental } =
exeContext;
const {
schema,
fragments,
operation,
variableValues,
rootValue,
disableIncremental,
} = exeContext;

const rootType = schema.getSubscriptionType();
if (rootType == null) {
Expand Down

0 comments on commit fe36ffc

Please sign in to comment.