Add max depth option to ExecutableNormalizedOperationFactory#3268
Add max depth option to ExecutableNormalizedOperationFactory#3268dondonz merged 4 commits intographql-java:masterfrom
Conversation
| int curLevel, | ||
| int maxLevel) { | ||
| if (curLevel > maxLevel) { | ||
| throw new AbortExecutionException("Maximum query depth exceeded " + curLevel + " > " + maxLevel); |
There was a problem hiding this comment.
Copied this from MaxQueryDepthInstrumentation but let me know if I should make a more specific exception class.
There was a problem hiding this comment.
This makes sense - this is our stop exception class
| private final Locale locale; | ||
|
|
||
| public List<PossibleMerger> possibleMergerList = new ArrayList<>(); | ||
| private final List<PossibleMerger> possibleMergerList = new ArrayList<>(); |
There was a problem hiding this comment.
No reason for it to be public or not-final. The class is marked as@Internal so shouldn't break anything.
| */ | ||
| @PublicApi | ||
| public class ExecutableNormalizedOperationFactory { | ||
| public static class Options { |
There was a problem hiding this comment.
Added this new Options class which mimicks the Options pattern seen in the repo.
This stores things not directly related to the operation info.
|
Adding this code so we can remove reliance on |
| public int getMaxChildrenDepth() { | ||
| return maxChildrenDepth; | ||
| } | ||
| } |
There was a problem hiding this comment.
Nice one!
but can we have some javadoc on what they do please since its API
| public List<PossibleMerger> getPossibleMergerList() { | ||
| return possibleMergerList; | ||
| } | ||
|
|
No description provided.