Skip to content

Commit

Permalink
Squashed 'apollo-ios-codegen/' changes from 117e41c3..02ac68ac
Browse files Browse the repository at this point in the history
02ac68ac Remove redundant iteration in EntitySelectionTree merging algorithm (#308)

git-subtree-dir: apollo-ios-codegen
git-subtree-split: 02ac68ac01a88082b69d307a18274b28431fe9c5
  • Loading branch information
gh-action-runner authored and gh-action-runner committed Mar 22, 2024
1 parent 4fbe840 commit f236318
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions Sources/IR/IR+EntitySelectionTree.swift
Original file line number Diff line number Diff line change
Expand Up @@ -224,23 +224,6 @@ class EntitySelectionTree {
targetSelections.mergeIn(scopeSelections, from: source)
}

if let conditionalScopes = scopeConditions {
for (condition, node) in conditionalScopes {
guard !node.scope.isDeferred else { continue }

if scopePathNode.value.matches(condition) {
node.mergeSelections(
matchingScopePath: scopePathNode,
into: targetSelections,
transformingSelections: transformingSelections
)

} else {
targetSelections.addMergedInlineFragment(with: condition)
}
}
}

case .none: break
}

Expand All @@ -254,6 +237,8 @@ class EntitySelectionTree {
into: targetSelections,
transformingSelections: transformingSelections
)
} else if case .selections = child {
targetSelections.addMergedInlineFragment(with: condition)
}
}
}
Expand Down

0 comments on commit f236318

Please sign in to comment.