Skip to content

Collect references from input-aware AST signatures#4377

Merged
andimarek merged 1 commit into
masterfrom
ast-signature-input-references
May 10, 2026
Merged

Collect references from input-aware AST signatures#4377
andimarek merged 1 commit into
masterfrom
ast-signature-input-references

Conversation

@andimarek
Copy link
Copy Markdown
Member

@andimarek andimarek commented May 10, 2026

Summary

  • Change AstSignature.signatureWithInput to return a result object containing the signature document plus referenced fields, used directives, field arguments, directive arguments, and input object fields.
  • Collect references during the existing input-redaction pass instead of walking the redacted/sorted document a second time.
  • Record per-fragment references during fragment redaction and merge only fragments reachable from the selected operation's fragment-spread graph.
  • Add focused AstSignature tests for omitted variables, directive arguments, used directives, variable-definition directives, fragments, recursive/unreferenced fragments, interfaces/unions, and result transform coverage.

Test

  • ./gradlew test --tests graphql.language.AstSignatureTest jacocoTestReport --rerun-tasks

Coverage

  • Focused JaCoCo source report shows no missed lines or branches for AstSignatureInputReferences, AstSignatureReferenceCollector, and AstSignatureWithInputResult.
  • AstSignature has 100% line coverage in the focused run; remaining branch misses are pre-existing branches outside this change.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 10, 2026

Test Report

Test Results

Java Version Total Passed Failed Errors Skipped
Java 11 5775 (+13 🟢) 5719 (+13 🟢) 0 (±0) 0 (±0) 56 (±0)
Java 17 5775 (+13 🟢) 5718 (+13 🟢) 0 (±0) 0 (±0) 57 (±0)
Java 21 5775 (+13 🟢) 5718 (+13 🟢) 0 (±0) 0 (±0) 57 (±0)
Java 25 5775 (+13 🟢) 5718 (+13 🟢) 0 (±0) 0 (±0) 57 (±0)
jcstress 32 (±0) 32 (±0) 0 (±0) 0 (±0) 0 (±0)
Total 23132 (+52 🟢) 22905 (+52 🟢) 0 (±0) 0 (±0) 227 (±0)

Code Coverage (Java 25)

Metric Covered Missed Coverage vs Master
Lines 29304 3113 90.4% ±0.0%
Branches 8576 1508 85.0% ±0.0%
Methods 7835 1218 86.5% +0.1% 🟢

Changed Class Coverage (5 classes)

Class Line Branch Method
g.l.AstSignature ±0.0% +0.2% 🟢 ±0.0%
g.l.AstSignatureInputReferences +100.0% 🟢 ±0.0% +100.0% 🟢
g.l.AstSignatureReferenceCollector +100.0% 🟢 +100.0% 🟢 +100.0% 🟢
g.l.AstSignatureWithInputResult +100.0% 🟢 ±0.0% +100.0% 🟢
g.l.AstSignatureWithInputResult
$Builder
+100.0% 🟢 ±0.0% +100.0% 🟢

Full HTML report: build artifact jacoco-html-report

Updated: 2026-05-10 10:54:52 UTC

@andimarek andimarek force-pushed the ast-signature-input-references branch from 3220b99 to 06f3020 Compare May 10, 2026 10:45
@andimarek andimarek merged commit cb6c245 into master May 10, 2026
11 checks passed
@andimarek andimarek deleted the ast-signature-input-references branch May 10, 2026 10:55
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