mergeSelectionSets function
Implementation
SelectionSetNode mergeSelectionSets(List<SelectionNode> fields) {
final selectionSet = <SelectionNode>[];
for (final field in fields) {
final fieldSelections = field.selectionSet?.selections;
if (fieldSelections != null) {
selectionSet.addAll(fieldSelections);
}
}
return SelectionSetNode(selections: selectionSet);
}