FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Simplify circular default value validation by andimarek · Pull Request #4460 · graphql-java/graphql-java · GitHub

Simplify circular default value validation - #4460

Open
andimarek wants to merge 2 commits into
masterfrom
codex/simplify-circular-default-validation
Open

Simplify circular default value validation#4460
andimarek wants to merge 2 commits into
masterfrom
codex/simplify-circular-default-validation

Conversation

andimarek commented Aug 23, 2026
edited
Loading

Copy link
Copy Markdown
Member

Summary

Ports the core circular-default validation simplifications from the merged 26.x backport in #4450 to master while retaining all existing master integration coverage.

  • unify literal and programmatic default traversal in NoDefaultValueCircularRefs
  • support programmatic iterable and Java array values through the same traversal
  • detect input-object cycles from arguments before external default coercion can recursively expand them
  • create fresh stateful schema validation rules for every validation run
  • consolidate the lower-level circular-default Spock cases without removing CircularInputDefaultValuesTest

Analysis

The master implementation still had separate AST and external-value algorithms, retained validation-rule state across runs, and could reach external-value coercion before a circular default had been recorded. The #4450 implementation cleanup removes those failure modes and reduces the focused implementation and lower-level test code by 75 net lines.

Unlike #4450, this PR intentionally preserves CircularInputDefaultValuesTest so the higher-level schema-build coverage and explicit SDL argument-default regression remain in place.

Testing

  • ./gradlew test --tests graphql.CircularInputDefaultValuesTest --tests graphql.schema.validation.NoDefaultValueCircularRefsTest --tests graphql.schema.validation.SchemaValidatorTest (25 tests)
  • ./gradlew test (5,754 tests)
  • ./gradlew check -x test -x testng

All passed on Java 25.

Port the focused cleanup from the 26.x backport in #4450 to master.

github-actions Bot commented Aug 23, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Test Report

Test Results

Java Version Total Passed Failed Errors Skipped
Java 11 5944 (+4 🟢) 5888 (+4 🟢) 0 (±0) 0 (±0) 56 (±0)
Java 17 5944 (+4 🟢) 5887 (+4 🟢) 0 (±0) 0 (±0) 57 (±0)
Java 21 5944 (+4 🟢) 5887 (+4 🟢) 0 (±0) 0 (±0) 57 (±0)
Java 25 5944 (+4 🟢) 5887 (+4 🟢) 0 (±0) 0 (±0) 57 (±0)
jcstress 32 (±0) 32 (±0) 0 (±0) 0 (±0) 0 (±0)
Total 23808 (+16 🟢) 23581 (+16 🟢) 0 (±0) 0 (±0) 227 (±0)

Code Coverage (Java 25)

Metric Covered Missed Coverage vs Master
Lines 30098 3090 90.7% +0.1% 🟢
Branches 8805 1489 85.5% +0.3% 🟢
Methods 8040 1205 87.0% ±0.0%

Changed Class Coverage (3 classes)

Class Line Branch Method
g.s.v.DefaultValuesAreValid +0.5% 🟢 +1.0% 🟢 ±0.0%
g.s.v.NoDefaultValueCircularRefs +33.3% 🟢 +45.0% 🟢 +20.0% 🟢
g.s.v.SchemaValidationErrorCollector +22.2% 🟢 +50.0% 🟢 ±0.0%

Full HTML report: build artifact jacoco-html-report

Updated: 2026-08-23 23:34:10 UTC

Keep the higher-level SDL and argument-default regression tests on master.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL