Skip to content

Commit

Permalink
fix updated collect fields from fragment-args-branch
Browse files Browse the repository at this point in the history
latest edits not included within graphql#4015
  • Loading branch information
yaacovCR committed Sep 6, 2024
1 parent be16adf commit 6972be6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/execution/collectFields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ interface CollectFieldsContext {
schema: GraphQLSchema;
fragments: ObjMap<FragmentDetails>;
variableValues: { [variable: string]: unknown };
fragmentVariableValues?: FragmentVariables;
operation: OperationDefinitionNode;
runtimeType: GraphQLObjectType;
visitedFragmentNames: Set<string>;
Expand Down Expand Up @@ -135,14 +134,16 @@ export function collectSubfields(
const newDeferUsages: Array<DeferUsage> = [];

for (const fieldDetail of fieldGroup) {
const node = fieldDetail.node;
if (node.selectionSet) {
const selectionSet = fieldDetail.node.selectionSet;
if (selectionSet) {
const { deferUsage, fragmentVariables } = fieldDetail;
collectFieldsImpl(
context,
node.selectionSet,
selectionSet,
subGroupedFieldSet,
newDeferUsages,
fieldDetail.deferUsage,
deferUsage,
fragmentVariables,
);
}
}
Expand Down

0 comments on commit 6972be6

Please sign in to comment.