Skip to content

Commit fdc3be2

Browse files
committed
doc reference to the source of the algorithm
1 parent c7b12f5 commit fdc3be2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/graphql/validation/rules/OverlappingFieldsCanBeMerged.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ private GraphQLFieldDefinition getVisibleFieldDefinition(GraphQLFieldsContainer
134134

135135

136136
private List<Conflict> findConflicts(Map<String, Set<FieldAndType>> fieldMap) {
137+
/**
138+
* The algorithm implemented here is not the one from the Spec, but is based on
139+
* https://tech.xing.com/graphql-overlapping-fields-can-be-merged-fast-ea6e92e0a01
140+
*/
137141
List<Conflict> result = new ArrayList<>();
138142
sameResponseShapeByName(fieldMap, emptyList(), result);
139143
sameForCommonParentsByName(fieldMap, emptyList(), result);

0 commit comments

Comments
 (0)