use of graphql.validation.ValidationErrorType.FieldsConflict in project graphql-java by graphql-java.
the class OverlappingFieldsCanBeMerged method leaveSelectionSet.
@Override
public void leaveSelectionSet(SelectionSet selectionSet) {
Map<String, List<FieldAndType>> fieldMap = new LinkedHashMap<>();
Set<String> visitedFragmentSpreads = new LinkedHashSet<>();
collectFields(fieldMap, selectionSet, getValidationContext().getOutputType(), visitedFragmentSpreads);
List<Conflict> conflicts = findConflicts(fieldMap);
for (Conflict conflict : conflicts) {
addError(FieldsConflict, conflict.fields, conflict.reason);
}
}
Aggregations