Skip to content

Commit

Permalink
Undo defensive code for internalFragments, it's not needed after all
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-scheer committed Feb 19, 2020
1 parent 2e126fc commit e77895d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/apollo-gateway/src/QueryPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export interface FetchNode {
selectionSet: SelectionSetNode;
variableUsages?: { [name: string]: VariableDefinitionNode };
requires?: SelectionSetNode;
internalFragments?: Set<FragmentDefinitionNode>;
internalFragments: Set<FragmentDefinitionNode>;
}
export interface FlattenNode {
kind: 'Flatten';
Expand Down
4 changes: 2 additions & 2 deletions packages/apollo-gateway/src/executeQueryPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ function operationForRootFetch(
selectionSet: fetch.selectionSet,
variableDefinitions: mapFetchNodeToVariableDefinitions(fetch),
},
...(fetch.internalFragments || []),
...fetch.internalFragments,
],
};
}
Expand Down Expand Up @@ -557,7 +557,7 @@ function operationForEntitiesFetch(fetch: FetchNode): DocumentNode {
],
},
},
...(fetch.internalFragments || [])
...fetch.internalFragments
],
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function printNode(
) +
config.spacingOuter +
indentation +
(node.internalFragments && node.internalFragments.size > 0
(node.internalFragments.size > 0
? ' ' +
Array.from(node.internalFragments)
.map(fragment =>
Expand Down

0 comments on commit e77895d

Please sign in to comment.