Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix benchmark test to use unlimited QueryComplexityLimits
The OverlappingFieldsCanBeMergedBenchmarkTest uses intentionally large
queries (108k fields, depth 101) that exceed default complexity limits.
Pass QueryComplexityLimits.NONE to bypass the limits in these tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
  • Loading branch information
andimarek and claude committed Mar 22, 2026
commit 455c7c8767a1672af51dcaf7716b229cb60ebf19
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class OverlappingFieldsCanBeMergedBenchmarkTest extends Specification {
private List<ValidationError> validateQuery(GraphQLSchema schema, Document document) {
ValidationErrorCollector errorCollector = new ValidationErrorCollector()
I18n i18n = I18n.i18n(I18n.BundleType.Validation, Locale.ENGLISH)
ValidationContext validationContext = new ValidationContext(schema, document, i18n)
ValidationContext validationContext = new ValidationContext(schema, document, i18n, QueryComplexityLimits.NONE)
OperationValidator operationValidator = new OperationValidator(validationContext, errorCollector,
{ r -> r == OperationValidationRule.OVERLAPPING_FIELDS_CAN_BE_MERGED })
LanguageTraversal languageTraversal = new LanguageTraversal()
Expand All @@ -74,7 +74,11 @@ class OverlappingFieldsCanBeMergedBenchmarkTest extends Specification {
def "large schema query executes without errors"() {
when:
GraphQL graphQL = GraphQL.newGraphQL(schema).build()
ExecutionResult executionResult = graphQL.execute(loadResource("large-schema-4-query.graphql"))
def executionInput = graphql.ExecutionInput.newExecutionInput()
.query(loadResource("large-schema-4-query.graphql"))
.graphQLContext([(QueryComplexityLimits.KEY): QueryComplexityLimits.NONE])
.build()
ExecutionResult executionResult = graphQL.execute(executionInput)

then:
executionResult.errors.size() == 0
Expand Down
Loading