Skip to content

Commit eafa3a3

Browse files
committed
add/fix javadoc
1 parent 534a0d8 commit eafa3a3

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/main/java/graphql/analysis/FieldComplexityCalculator.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,21 @@
22

33
import graphql.PublicApi;
44

5+
/**
6+
* Used to calculate the complexity of a field. Used by {@link MaxQueryComplexityInstrumentation}.
7+
*/
58
@PublicApi
69
@FunctionalInterface
710
public interface FieldComplexityCalculator {
811

12+
/**
13+
* Calculates the complexity of a field
14+
*
15+
* @param environment several information about the current field
16+
* @param childComplexity the sum of all child complexity scores
17+
*
18+
* @return the calculated complexity
19+
*/
920
int calculate(FieldComplexityEnvironment environment, int childComplexity);
1021

1122
}

src/main/java/graphql/analysis/MaxQueryComplexityInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import static graphql.Assert.assertNotNull;
1616

1717
/**
18-
* Prevents execution if the query complexity is greater than the specified maxDepth
18+
* Prevents execution if the query complexity is greater than the specified maxComplexity
1919
*/
2020
@PublicApi
2121
public class MaxQueryComplexityInstrumentation extends NoOpInstrumentation {

0 commit comments

Comments
 (0)